title: php cannot check if a PDO result is empty using empty() returns FATAL ERROR
body: <p>I want to check whether my prepared query has returned empty or not without having to go into a loop. This is the code I have tried using:</p>
  
  <pre><code>if(empty($pQuery1-&gt;fetch(PDO::FETCH_ASSOC))){}
  </code></pre>
  
  <p>When I try this I get the error:</p>
  
  <p><code>Fatal error: Can't use method return value in write context</code></p>
  
  <p>Whether I  use <code>PDO-&gt;fetchALL</code> or <code>PDO-&gt;fetch</code> I receive the same error. Should I be doing something differently?</p>