lunes, 3 de octubre de 2016

The special NULL value represents a variable with no value. NULL is the only possible value of type null.
A variable is considered to be null if:
  • it has been assigned the constant NULL.
  • it has not been set to any value yet.
  • it has been unset().
If a variable is  equal to  0, "",'' is  equal to be null

<?php
$r="";

if(!$r)
{
echo " var is null ";
}


else {
echo " var has a value";
}

?>

No hay comentarios:

Publicar un comentario