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.
$db = JFactory::getDbo();
$query = "SELECT * FROM mytable";
$db->setQuery($query);
$results = $db->loadObjectList();
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!