|
Posted by mantrid on 09/02/06 13:19
Below are two different ways of writing the same script. The top one works
but the bottom one displays nothing in the list. Can anyone see why?
<?php
echo "<select name='subcat' style='WIDTH: 95%'><option value=''>Select
one</option>";
while($noticia = mysql_fetch_array($quer)) {
echo "<option value='$noticia[TopicID]'>$noticia[Topic]</option>";
}
echo "</select>";
?>
<select name="subcat" style="WIDTH: 95%">
<option value="">Select one</option>
<?php while($noticia = mysql_fetch_array($quer)) { ?>
<option value="<?php $noticia[TopicID]; ?>"><?php $noticia[Topic];
?></option>
<?php } ?>
</select>
Ian
Navigation:
[Reply to this message]
|