title: how can I check an empty variable in php with &nbsp value?
body: <p>I have a string:</p>
  
  <pre><code>$string
  </code></pre>
  
  <p>if I print it nothing return to me:</p>
  
  <pre><code>echo $string; // result in browser: blank!  in html source code:&amp;nbsp
  </code></pre>
  
  <p>I try use this code to undererstand $string is empty!</p>
  
  <pre><code>if ($string!= '&amp;nbsp' &amp;&amp; $string!= ' ' &amp;&amp; $string!= '' &amp;&amp; $string!= null &amp;&amp; $string!= '  ' &amp;&amp; !empty($string))
  echo 'true';
  else
  echo 'false';
  </code></pre>
  
  <p>But  It always return me 'true', why? //I think in $string there many space or sth like that</p>