As well, print_r doesn't "pretty print", so you will find something like this to be more readable:
echo "<pre>";
print_r($array);
echo "</pre>";
I use a function like this extensively for debugging and find it to be a little easier:
function print_pre($array) {
echo "<pre>";
print_r($array);
echo "</pre>";
}