try this
echo "<select name=\"page\">";
for($lowerBound=0, $j=0; $lowerBound<$resultCount; $lowerBound += $maxResultsPerPage, $j++)
{
$dispLBound = $lowerBound+1;
$dispUBound = (($lowerBound+$maxResultsPerPage)>$resultCount) ? ($resultCount+1) : (($lowerBound+$maxResultsPerPage));
echo "<option value=\"$j\">$dispLBound -> $dispUBound</option>";
}
echo "</select>";
$resultCount is the total number of results and $maxResultsPerPage is the maximum number of results to be displayed on one page.
[edit1]Forgot to menntion, the second line in the for loop checks to see if th upperbound is more than the total results. If it is more then it sets the value to the total results, thus say you had 72 results the last entry would say "71 -> 72" & not "71 -> 80". If you dont want this to happen simply replace that line with "$dispUBound = $lowerBound+$maxResultsPerPage;"[/edit1]
[edit] okuto1973 : you may want to check what your code actually does before posting it 😉 [/edit]