variable with NULL value

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

 



Hi,

one more question.

Why the variable, that contains NULL value appears to be not set. When you try to echo it the php does not produce warning about using undefined variable.

//$connection contains database connection handler
$result=mysql_query("select NULL as value",$connection);
$tmp=mysql_fetch_array($result);
$foo=$tmp["value"];
if (!isset($foo)) echo("\$foo is not set but does not produce warning -$foo-");

OKi98

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux