How To Iterate Through an Associated Array in PHP

The following code will allow you to iterate through any associated array in PHP. The keys in the array are displayed in a bold font.


foreach ($list as $i => $values)
{
foreach ($values as $key => $value)
echo "$key => $value";

echo "
";
}