bpat1434 wrote:Your codes are not the same.
If you are asking if something is null,
and you set it to "NULL" then it becomes a string (NULL) and has a value.
If you don't use quotes, and set it to NULL then it doesn't have a value.
Thanks, that was what I meant.
$var = "NULL";
does not mean $var is NULL
It does mean that $var is SET to be a STRING = 'NULL'
But if you make a variable a string 'NULL' ,
why use the string 'NULL', when you can use 'nop' , 'nothing' or whatever
Same thing goes for trying to make a variable FALSE and put Quotes around ( "FALSE" or "false"
<?php
$var = "FALSE"; // var is not FALSE, it is a string of 5 characters!
if( $var ) echo 'result 1':
else echo 'result 0';
echo '<br>';
if ( $var == FALSE ) echo 'var is FALSE';
else echo 'var is not FALSE';