I am trying to return only lines 25-50 of an array of arrays. So, I have this:
$sql="SELECT name, address1, address2, city, state_province, zip
FROM Organization
WHERE active = '1'";
This returns 250 results. Normally, I would do something like this to echo the results:
if ($result = mysql_query($sql)) {
while ($row = mysql_fetch_array($result)) {
echo $row['name'].", ".$row[address1].", ".$row[address2].", ".$row[city].", ".$row[state_province].", ".$row[zip]."<br>";
}
}
In this case, however, I want to return only rows 25 - 50 of my result set. How do I do this? I've looked up array_splice, but either that doesn't do it, or I wasn't doing it right.
Any thoughts?
Thanks.