Reputation: 71
Can someone see where I have gone wrong? I have
echo'<option value='.$row['car'].'>'.$row['car'].'</option>';
}
?>
</select>
I want to display the whole word in $row['car']
.
Upvotes: 0
Views: 1275
Reputation: 324750
You MUST have quotes around your attributes if they contain more than one word.
echo '<option value="'.$row['car'].'">' . $row['car'] . '</option>';
Upvotes: 5