Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\shopcart\Ch04\page_furniture_index.inc on line 31
Here's a code snippet from the first file Catalog.php:
***** PLEASE USE PHP CODE TAGS AROUND YOUR CODE *****
Code: Select all
while($row = mysqli_fetch_array($result)) #64
{
$furn_categories[$row['category']][]=$row['type'];
}
include("page_furniture_index.inc"); #68
}
?>Code: Select all
foreach($furn_categories as $key => $subarray) #31
{
echo "<li>$key</li>\n"; #33
echo "<ul>\n"; #34
foreach($subarray as $type) #35
{
echo "<li class='level2'>
<input type='radio' name='interest'
id='$type' value='$type' />
<label for='$type'>$type</label></li>\n";
} // end foreach type #41