title: PDO Return All Rows
body: <p>So, right now I have a PHP function that utilizes PDO to return the first row of a specific table. That works fine, but I want to return all of the information, while being able to organize it all.</p>
  <p>I have the table <code>zip__admins</code> and I'm trying to return the <code>first_name</code> and <code>last_name</code> from the table. With this information, I have a button on the login page asking the user to select their name (each person gets their own button) to sign in. As of now, I'm returning one result, instead of two results. How can I modify the below code to return two results, and input the data into a templating parameter.</p>
  <pre><code>final public function fetchAdminInfo() {
      global $zip, $db, $tpl;
  
      $query = $db-&gt;prepare('SELECT first_name, last_name FROM zip__admins');
      $query-&gt;execute();
  
      $result = $query-&gt;fetch(PDO::FETCH_ASSOC);
  
      $tpl-&gt;define('admin: first_name', $result['first_name']);
      $tpl-&gt;define('admin: last_name', $result['last_name']);
  }
  </code></pre>
  <p>Here is my table:
  ![SQL Table][1]</p>