title: PHP SQL Joomla store table with two columns into array and echo them later
body: <p>So I have a simple table with two columns.  The table is called "mytable" and the columns are "product" and "id".  The table has about 12 entries.</p>
  
  <pre><code>            $db = JFactory::getDbo();
              $query = "SELECT * FROM mytable";
              $db-&gt;setQuery($query);
              $results = $db-&gt;loadObjectList();
  </code></pre>
  
  <p>So I've gotten this far querying successfully but I want to call back the results of each row. That's the part I am stuck on.  I need to store this into an array so I can later make a while loop spitting out each row.  Also I cannot echo it right underneath that code.  This needs to be stored in an array that is then pulled from another page and then I spit out each row.  Thanks!</p>