Making it even easier with foreach's
Submitted by brettz9 on Fri, 2006-08-18 11:41.
ezSQL
The very well-written help page on site here could even be made easier, if one uses type casting, as one user has noted at the PHP Online manual's foreach page, to cast the results as an array (thus making it unnecessary to use an if-test to make sure there are in fact results). For example, this will work even if there are no results:
foreach ((array) $db->get_results($query) as $q) {
...
}
