title: how to avoid output foreach error?
body: <p>In this <a href="http://php.net/manual/en/control-structures.foreach.php" rel="nofollow">article</a>, it mentions:</p>
  
  <blockquote>
    <p><em><strong>foreach</em></strong> does not support the ability to suppress error messages using '@'.</p>
  </blockquote>
  
  <p>How do I avoid an output <code>foreach</code> error? I do not want see:</p>
  
  <blockquote>
    <p><strong>Warning</strong>: Invalid argument supplied for foreach()</p>
  </blockquote>
  
  <p>Is there a way to make an <code>if else</code> judgement?</p>