Re: A silly question. :P

From: Date: Fri, 08 Mar 2002 15:33:13 +0000
Subject: Re: A silly question. :P
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87778@lists.php.net to get a copy of this message
On Thursday, March 7, 2002, at 11:50 PM, GENESiS DESiGNS wrote:
I would like to know why you put this character (!) in front of this:
Nearly unanimously to all programming languages, the bang (!) symbol indicates "not" or "negative" or "inverse" or "not true". So you use it when you want to indicate that something is "not the case" or if you are performing a test for the lack of a condition rather than the condition itself. Like this: if ($var) { echo "Yes, var exists"; } elseif (!$var) { echo "No, there is no variable called var"; } else { echo "You cannot reach this part of the if statement.
        Either var exists or it doesn't";
} (!(Hope that doesn't help)), Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#87778) next »