I am build a basic Database API (mainly MySQL) .... I would like to do the following.... (I want the idiomatic way)
while ($row = $sth->fetch (PDO::FETCH_OBJ))
printf ("Name: %s, Category: %s\
", $row->name, $row->category);
Instead of the above I would want to create an associative array of arrrays that
would hold contain $row... I intend to return the associative array to my view.
Could someone help me with the best way to do this?