Forum Moderators: coopster
# Use the incoming 'chunk' parameter to
# select only a slice of the data for display.
#
$chunk_size = 10;
$offset = $chunk_size * $chunk;
$previous = $chunk - 1;
$next = $chunk + 1;
$starting_record = $chunk * $chunk_size + 1;
$ending_record = ($chunk + 1) * $chunk_size;
# Determine the total number of dealers matching the criteria.
$num_dealers = count($listingziparray);
$last = floor($num_dealers/$chunk_size);
if ($ending_record > $num_dealers)
{
$ending_record = $num_dealers;
}
# Now retrieve the actual data in the array, limiting the number
# of results according to the chunk size.
#
THIS IS WHERE I'M HAVING THE PROBLEM. I DON'T KNOW HOW TO LIMIT THE ARRAY RESULTS.
THE FOLLOWING CODE IS WHAT I USED WHEN DEALING WITH DATA FROM DB:
//$where .= " LIMIT $offset, $chunk_size";
//$query = "SELECT * FROM dealer $where";
//$result = mysql_query($query);