Re: sql query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



! 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux