| |
| * Link führt ins Internet |
|

| |
Befehl | Version | Beschreibung | Beispiel | Ausgabe |
Befehl
| bool empty ( mixed $var ) |
Version
Beschreibung
Die Funktion empty() liefert true zurück, wenn eine Variable (var) nicht definiert, leer oder gleich 0 ist. In allen anderen Fällen wird false als Antwort geliefert.
Siehe auch:
• isset()
• unset() |
Beispiel
<?PHP
$a = '24';
$b = '0';
$c = '';
if ( ! empty ( $a ) )
{
echo 'Variable $a ist gefüllt<br />';
}
if ( empty ( $b ) )
{
echo 'Variable $b ist empty<br />';
}
if ( empty ( $c ) )
{
echo 'Variable $c ist empty<br />';
}
if ( empty ( $d ) )
{
echo 'Variable $d ist empty<br />';
}
?>
|
Ausgabe
Variable $a ist gefüllt
Variable $b ist empty
Variable $c ist empty
Variable $d ist empty
|
|
|
|
|
|
|


|