Chris L.: isset/empty

Beitrag lesen

Hallo molily,

und dann siehst du den kleinen aber manchmal sehr entscheidenden Unterschied zwischen:

<?php
ini_set('display_errors', '1');
error_reporting(E_ALL);

if ( !empty($variable) && $variable != "irgendwas" )
  echo $variable;
?>

und

<?php
ini_set('display_errors', '1');
error_reporting(E_ALL);

if ( !empty($variable) )
  if ( $variable != "irgendwas" )
    echo $variable;
?>

Ciao
Chris