You are here: Re: how control struct evaluate « PHP Programming Language « IT news, forums, messages
Re: how control struct evaluate

Posted by jamen on 08/01/05 06:20

Michael G wrote:

> $PHONETIC is an array of strings. How can !$PHONETIC['d'], in the case
> below, evalutae to true. It is a string not a boolean. It would make more
> sense if it evalutated to null.

> $PHONETIC = array('a' => 'alpha', 'b' => 'bravo', 'c' => 'charlie');

Actually, I think it does. Try:

echo @gettype($PHONETIC['d']);

And when you use NULL in a boolean expression, it evaluates to false

 

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

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