Categories
Code Snippets PHP

Display an Array in PHP

function display_array($your_array)
{

foreach ($your_array as $key => $value)
{

if (is_array($value))
{
display_array($value);
}
else
{
echo  ‘<br> – Key: ‘ .$key . ‘ :: Value: ‘ . $value . “<br />\n”;
}
}

return $out;
}