Reply to how can one variable equal 2 things??

Your name:

Reply:


Posted by Marcus on 07/03/05 01:34

I'm having a problem that is baffling me... say I set a session variable
as so:

$_SESSION['temp'] = "default";

Now if I test the following two conditionals:

if($_SESSION['temp'] == "default")

and

if($_SESSION['temp'] == 0)

they both return TRUE. I don't understand why this is... if anything, I
would have thought testing if it == 1 would be a boolean true since the
variable exists and is not NULL, but testing if == 1 returns FALSE.
Thanks in advance.

[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

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