i'm sure other people have done this before, but i wanted to share this piece of code anyway. i got fed up with var_dump and print_r, as they are just not human readable.... i use this function instead now to show me what's in an array. Very handy during debugging, especially for multi-dimensional arrays:
function echoarray($a)
{if (is_array($a))
{foreach ($a as $key => $value)
{echo "<ul><li>$key: ";
if (is_array($value))
echoarray($value);
else
echo $value."</li>";
echo "</ul>";
}
}
}