title: Why does PDO fetch() return only the first row?
body: <p>When I select and print it, it shows only the first row, the query is the same. Why does it return only one row?</p>
  
  <p>PHP Code:</p>
  
  <pre><code>$e = $db-&gt;query("SELECT `username`, `membership` FROM `users` WHERE `expire` != ''")-&gt;fetch();
  print_r($e);
  </code></pre>
  
  <p>Result with PHP:</p>
  
  <pre><code>Array ( [username] =&gt; ItzBruney05 [0] =&gt; ItzBruney05 [membership] =&gt; 300 [1] =&gt; 300 ) 
  </code></pre>
  
  <p>Result when query is executed in phpMyAdmin:</p>
  
  <p><a href="https://i.stack.imgur.com/AgW8p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AgW8p.png" alt="enter image description here"></a></p>