note 53006 deleted from function.empty by nlopess
| From: | nlopess@php.net | Date: | Tue, 31 May 2005 09:54:05 +0000 |
| Subject: | note 53006 deleted from function.empty by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-89672@lists.php.net to get a copy of this message | ||
Note Submitter: Juan Manuel
----
Tenga en cuenta que no sólo el int o float 0 se considera como valor vacío, también el valor NULL
se considera vacío.
<?php
$var = NULL;
if(empty($var))
print "La variable está vacía";
else
print "La variable NO está vacía";
?>
Esto produce como resultado:
La variable está vacía