You are here: Re: What does this mean? « All PHP « IT news, forums, messages
Re: What does this mean?

Posted by Steve on 09/28/93 11:41

"Jim Michaels" <NOSPAMFORjmichae3@yahoo.com> wrote in
news:nPKdncjdLLnd-prZRVn-iw@comcast.com:


>>
>> $password = isset($HTTP_POST_VARS['password']) ?
>> $HTTP_POST_VARS['password'] : '';
>>
>> I have never seen the question mark or colon used in this way before.
>> I can't find any reference to it in my PHP book. Please tell me
>> what it means.



I have always understood it as a simple "if" and "else". example

$value = ( $a == $b ) ? $c : $d;

So if vars $a == $b the variable $value will be set as $c if not the
value $d

i think there is another reason too but thats how i use it. Someone may
give a better explanation.

 

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

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