Reply to Re: if null=true

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация