|
Posted by bill on 04/01/07 13:17
Toby A Inkster wrote:
> bill wrote:
>
>> One additional question: does the foreach loop terminate because
>> the query return false ?
>
> It terminates as soon as the query has run out of rows.
>
> It's a PHP 5 feature called "Iterators" -- that is PDO queries are
> returned as objects that, although they are not arrays, can be treated as
> arrays in a foreach loop. The solution would work equally well using PHP 4
> constructs, but the code doesn't look as neat.
>
THank you,
I am stuck using 4.x because my hosting company does not have
PHP5 available, yet.
What would be the php 4 code ?
Thanks to all (even Jerry, who thinks that we should be
elsewhere) for the great discussion.
bill
[Back to original message]
|