title: PHP/MySQL: Why is my query only returning the first row?
body: <p>Why is my method only returning the first row of my table? I can't understand why and it's driving me nuts. I'm sure it's something very simple.</p>
  
  <pre><code>public function getTitlesForRegistrationForm() {
      $result = $this-&gt;_db-&gt;query("SELECT UserTitleID, UserTitleName FROM UserTitles");
      $i=0;
      $array[0] = "No result";
      foreach($result-&gt;fetch(PDO::FETCH_ASSOC) as $row){
          $array[$i] = $row;
          $i++;
      }
      return $array;
  }
  </code></pre>
  
  <p>Thanks.</p>