I\'m developing a php app that uses a database class to query mySQL.
the class is here: http://net.tutsplus.com/tutorials/php/real-world-oop-with-php-and-mysql/
Example with mysql_fetch_assoc():
mysql_fetch_assoc()
while ($row = mysql_fetch_assoc($result)) { /* ... your stuff ...*/ }
In your case with foreach, with the $result array you get from select():
foreach
$result
select()
foreach ($result as $row) { /* ... your stuff ...*/ }
It's much like the same, with proper iteration.