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 Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to