RecordSet::next - jcobban/Genealogy GitHub Wiki

$recordSet->next()

Up: class RecordSet

This is part of the internal implementation of support for iteration using the foreach statement through implementation of the interface Iterator. It is called by foreach to reposition to the next member of the set. Normally foreach is the clearest and most compact way to look at the members of the set. However occasionally an application needs to sequence through the members of the set using some other iteration structure.

    $record     = $recordSet->rewind();
    for($i = 0; $record;}
    {
        // do something with $record
        $record = $recordSet->next();
    }

If the iterator is at the last entry of the set, this method returns false, otherwise it returns an instance of class Record.

It is the equivalent of calling next($array).

Next: $recordSet->table