title: Using if(!empty) with multiple variables not in an array
body: <p>I am trying to polish some code with the <code>if(!empty)</code> function in PHP but I don't know how to apply this to multiple variables when they are not an array (as I had to do previously) so if I have:</p>
  
  <pre><code>$vFoo       = $item[1]; 
  $vSomeValue = $item[2]; 
  $vAnother   = $item[3];
  </code></pre>
  
  <p>Then I want to print the result only if there is a value. This works for one variable so you have:</p>
  
  <pre><code> if (!empty($vFoo)) {
       $result .= "&lt;li&gt;$vFoo&lt;/li&gt;";
   }
  </code></pre>
  
  <p>I tried something along the lines of </p>
  
  <pre><code>if(!empty($vFoo,$vSomeValue,$vAnother) {
      $result .= "&lt;li&gt;$vFoo&lt;/li&gt;"
      $result .= "&lt;li&gt;$vSomeValue&lt;/li&gt;"
      $result .= "&lt;li&gt;$vAnother&lt;/li&gt;"
  }
  </code></pre>
  
  <p>But of course, it doesn't work.</p>