I'd like to traverse a resultset using a while() loop instead the most common foreach()
If I have this code for example:
$articles = $this->Articles->find();
foreach ($articles as $article) {
echo $article->name;
}
How can I access rows of $articles using a while loop ?
I already tried traverse it using next() or $articles->next() with no success.
foreach
loop too? In any case, if applicable I'd probably suggest to use the result sets grouping functionality.