Skip to content

Instantly share code, notes, and snippets.

@CrowderSoup
Created October 26, 2012 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save CrowderSoup/3956623 to your computer and use it in GitHub Desktop.
Save CrowderSoup/3956623 to your computer and use it in GitHub Desktop.
Better var_dump for Arrays
function PrintArray($aVals)
{
echo "<ul>";
foreach($aVals as $key => $val)
{
if(is_array($val))
{
echo "<li><strong>{$key}</strong>";
PrintArray($val);
echo "</li>";
}
else
{
echo "<li>{$key}: {$val}</li>";
}
}
echo "</ul>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment