When I echo var_dump($_variable), I get one long, wrapping line with all varable\'s and values like
[\"kt_login_user\"]=> string(8) \"teacher1\" [\"kt_lo
I usually have a nice function to handle output of an array, just to pretty it up a bit when debugging.
function pr($data)
{
echo "";
print_r($data); // or var_dump($data);
echo "
";
}
Then just call it
pr($array);
Or if you have an editor like that saves snippets so you can access them quicker instead of creating a function for each project you build or each page that requires just a quick test.
For print_r
:
echo "", print_r($data, 1), "
";
For var_dump()
:
echo "", var_dump($data), "
";
I use the above with PHP Storm. I have set it as a pr
tab command.