! is a logical NOT operator. It simply turns true => false, and false => true.

So, what you have is:
$a = true;
if($a) {
        echo 'true';
} else {
        echo 'false';
}

if(!$a) {
        echo 'false!';
} else {
        echo 'true!';
}

In these 2 cases, it will echo
true and true!

More info can be found here:
http://www.php.net/manual/en/language.operators.logical.php

William Stokes wrote:
Hello

Can someone explain this to me. I don't know how to read this.

if (!$variable = mysql_query("select id,sessid from users where ...

What is this "if(!"

I mean the ! sign.

Thanks

-Will

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



Reply via email to