I am having a problem with a double foreach statment.
$food_categories = array( "Fruit" => "Apple", );
foreach($food_categories as $key => $subarray)
{
echo "<h3>$key </h3>";
echo "<ul>";
foreach($subarray as $type)
{
echo "<input type='radio' name='interest'
value='$type'><b>$type</b><br>\n";
}
echo "</ul>";
}
the first statment works i.e .I get the word FRUIT appear. but the second foreach loop gives me the following and for the life of me I do not know why or what I am doing wrong..
Warning: Invalid argument supplied for foreach() in /home/xxx/public_html/xxxxx/catalog_index_page.inc on line 29