how can I output my php arrays in a readable html format using print_r?

I just use this simple function to wrap the call to print_r.  This displays your array in a good debugging format:

 

<?
function html_print_r($arr) {
  ?><pre><?
  print_r($arr);
  ?></pre><?
}
?>