Re: true, false

From: Date: Sun, 09 Mar 2003 22:38:30 +0000
Subject: Re: true, false
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138889@lists.php.net to get a copy of this message
At 23:37 09.03.2003, Liam Gibbs said: --------------------[snip]-------------------- >Why is it the following code produces nothing? > >$responsesubmitted = FALSE; >print($responsesubmitted); > >I have an if statement that says if($responsesubmitted), but it doesn't work. --------------------[snip]-------------------- because $responsesubmitted is false :) A "false" value is "empty", while true is "1" in PHP-speech (contrary to languages like C where false is defined either being "!true" or "0". In case the execution block after your if-statement doesn't get executed this construction works just as it should. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#138889) next »