I am using PHP while() to fetch the results of a database query.
while($results = mysql_fetch_array( $galleryresult )) { // show the results };
However, I would like to paginate the results if they exceed a certain number of entries. So for example if there are more than 12 entries returned, only the first 12 will be shown.
1) How can I adapt while() so only the first 12 entries are returned on the first page.
2) Then how can I adapt while() so the 13th-24th result are returned on the second page and so on.