step()

Used with step_all_class(), step_all_array(), and find_step()

Returns the next result in the pending query.

Returns false when it finishes with results or if there's no pending query

example.php
<?php
include("lib.php");
load("person");

$results_per_page = 10;
$search_string = $_GET["search_string"];
$uss = urlencode($search_string);
if (!$offset = (int) $_GET["offset"])   $offset = 0;

$p = new person;
$p->find_step("name", $offset, $results_per_page, "ASC", $search_string);
$pagination = $p->get_find_pagination("index.php?search_string=$uss", $offset, $results_per_page, "", $search_string, 3, "2arrow");

$i = $offset;
while($r = $p->step())
{
        echo "Person: ".(++$i).": $r->name<br>";
}

if ($pagination["p_link"] || $pagination["middle_links"] || $pagination["n_link"])
echo "$pagination[p_link] &nbsp; $pagination[n_link] &nbsp; $pagination[middle_links]";

?>