You are here: Re: NULL expected, won't show up ... « PHP Programming Language « IT news, forums, messages
Re: NULL expected, won't show up ...

Posted by frizzle on 03/18/06 12:57

Richard Levasseur wrote:
> You can also just do == 0
>
> "" == 0
> NULL == 0
> array() == 0
> 0 == 0
>
> Coldshine's method is better though. If you require all the data, make
> sure all of the parts have data in them.

Thank you both! So in fact it was ok to do my second option.
What i don't understand is the following:

echo '<br>year: '.($article_year? $article_year: 'null');
echo '<br>month: '.($article_month? $article_month: 'null');
echo '<br>article: '.($article_url? $article_url: 'null');

I know the statements, but what does it look for in this case?
Does it detect wether or not e.g. $article_year is set at all?

Frizzle.

 

Navigation:

[Reply to this 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

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