arrays() current() next() who to use
| From: | Vern | Date: | Thu, 19 Aug 2004 17:20:07 +0000 |
| Subject: | arrays() current() next() who to use | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-194268@lists.php.net to get a copy of this message | ||
I'm setting up an array based on recordset that does a loop as follows:
do {
//SET ARRAYS
$z['username'][$k] = $row_rsUSERIDID['uname'];
$z['distance'][$k++] = $totaldist;
} while ($row_rsUSERIDID = mysql_fetch_assoc($rsUSERIDID));
//SET NEW ARRAY
$z['user'] = $z['username'];
//SORT BY DISTANCES
natsort ($z['distance']);
reset ($z['distance']);
foreach($z['distance'] as $k => $v){
$newuser = "{$z['user'][$k]}";
echo $newuser . "<br>";
}
How can I now get this output displyed in groups of 10 so that I can display
them 10 at a time on a page then click a next button to dispaly they next 10
and so forth?