hello.... I'm stuck... I'm trying to populate a check box with a 2d array. I have made three arrays within one array, but when i run it, nothing appears..
here is the code i have used so far:
<legend>Optional extras</legend>
<optgroup label="Entertainment">
<?php
foreach($car_extras as $car_extras_id => $extras)
{
echo '.$car_extras_id.';
{
foreach($extras as $entertainment)
$i++;
echo '<input type=checkbox name="options" value="'.$extras.'" id="entertainment'.$num[$i].'"/>';
echo '<label for ="entertainment'.$num[$i].'">'.$entertainment.'</label><br/>';
}
}
?>
This is the array code
$car_extras = array
("Entertainment"=>array("6 disc DVD changer", "TV function", "DAB digital radio",
"Loudspeaker system - professional", "Multimedia navigation system"),
"Communication"=>array("Universal remote control", "Voice control", "Navigation system","Head-up display"),
"Safety & Security"=>array("Adaptive headlights", "Night vision with pedestrian recognition", "Run-flat tyres"));
Thanks for the help!