Normally print_r spits out an array with out any html linebreaks, so in a web browser, it is hard to see what your array looks like. I just throw in this little function to clean up the output:
function print_r_html ($arr) {
?><pre><?
print_r($arr);
?></pre><?
}
Just call it with "print_r_html($array);" for quick debugging of your scripts.