title: two different ways for checking if a variable is empty or not
body: <p>There was a question earlier <a href="https://stackoverflow.com/questions/5927767/php-echo-if-two-conditions-are-true">php echo if two conditions are true</a> and most of the guys answered using the statement <code>if(!empty($variable)){}</code> to check if a variable is empty or not while i answered <code>if($variable != ''){}</code>. My question is, why most of them answered with <code>if(!empty($variable)){}</code>, what are the differences between <code>if($variable != ''){}</code> expect readability? Readability is the only difference I'm currently seeing.</p>
  
  <p>Thanks,
  atno</p>