Posted by Oli Filth on 03/09/06 13:23
J.O. Aho said the following on 09/03/2006 11:19:
> Steve wrote:
>> Heres the code i have:
>>
>> <?php
>> if (isnull($number1))=false {
>> echo "<option value='<?php echo $number1; ?>'
>> selected='selected'>£<?php echo $number1; ?></option>";
>> }
>> ?>
>>
>> and heres the error:
>>
>> Parse error: parse error, unexpected '=' in
>> /home/users/uks08258/html/stephena.co.uk/j4m/calc.php on line 23
>>
>> is there a not null i can use?
>>
>
> It's a major error on your syntax
>
> if (isnull($number1))=false
>
> it's as wrong as trying
>
> ($a=1)=2;
>
> You should instead use a proper if-statment
>
> if (!isnull($number1)) {
> ...
> }
>
> or
>
> if (isnull($number1)=false) {
> ...
> }
>
The single-equals instead of a double-equals will be a problem as well... ;)
--
Oli
Navigation:
[Reply to this message]
|