Hi, I followed a tutorial to do a drop down menu in php and double checked it with a book I bought to make sure all the syntax is correct, but for some reason it isn’t working. Here is the code:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<?php
$category = array(
‘1’ => ‘Sacramento’,
‘2’ => ‘Roseville’,
‘3’ => ‘Granite Bay’,
‘4’ => ‘Eldorado Hills’,
‘5’ => ‘Folsom’,
‘6’ => ‘Lincoln’);
$category = str_replace(" ", " ", $category);
echo ‘<SELECT name=category>’;
foreach ($category as $key => $value)
{
echo ‘<OPTION value=’.$value.’> ‘.$value.’;
}
echo’</select>’;
?>
I have a feeling maybe I installed the apache server wrong on my computer and it just can’t read it. Does anyone see anything wrong with this code?