Web Hosting Talk







View Full Version : PHP/HTML Not outputting '0'


crEA-tEch
08-10-2004, 03:48 PM
Hey there... My Script is as follows:

<?
$a=='0';
while ($a < 32){ ?>
<option value="<? echo $a; ?>"><? echo $a; ?></option>
<?
++$a;
} ?>

The HTML (when you view the source of the page) for this is:

<option value="0">0</option><option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
etc etc..

The HTLM does not output the 0.. it just leaves the option blank in the dropdown list .. how can I make it so it shows the 0?

I would greatly appreciate anybodies help :)

crE

zupanm
08-10-2004, 03:53 PM
$a='0';

not ==

crEA-tEch
08-10-2004, 04:16 PM
thankyou!