title: RowCount() = 0 error php mysql
body: <pre><code>echo "&lt;h2 style='margin:0; padding:0;'&gt;Recent Comments&lt;/h2&gt;";
  
              if ($sth7-&gt;rowCount()) {
                  while($row7 = $sth7-&gt;fetch(PDO::FETCH_ASSOC)) {
                  echo "&lt;div class='comment'&gt;{$row7['usr']} said";
                  }
              }
              else($sth7-&gt;rowCount() = 0)                                                          
              echo "User";
  
  Can't use method return value in write context
  </code></pre>
  
  <p>Why doesnt that rowcount() = 0 logic work?</p>