I use the following snippet quite often when I am debugging:
echo \"\" . var_dump($var) . \"\";
\" . var_dump($var) . \"
And I find I usually
Well, print_r() is used to print and array, but in order to display the array in a pretty way you also need html tags.
Just do the following:
echo ""; print_r($data); echo "";
"; print_r($data); echo "