Skip to content

Instantly share code, notes, and snippets.

@saulovenancio
Forked from CrowderSoup/PrintArray.php
Created April 16, 2013 13:41
Show Gist options
  • Save saulovenancio/5395983 to your computer and use it in GitHub Desktop.
Save saulovenancio/5395983 to your computer and use it in GitHub Desktop.
<?php
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