Forum Moderators: coopster
i nned to know how to print elements in an array and tehn stop printing after a certain number, say 12. then by clicking on a link i want to printing to continue or start somewhere else in the array, but agian only print only 12 elements. i just need to know the theory behind and any function si may need. it is for a photo gallery where i want ot controll the number of thumbs per page.
thanks for any help
kumar
<?PHP
$NUMPERPAGE = 12;
if (!$index) $index = 0;
for ($i=1; $i <= $NUMPERPAGE; $i++) {
echo "<P>Displaying image " . ($index+$i) . "</P>";
}
?>
Then your links can be:
gallery.html
gallery.html?index=12
gallery.html?index=24
...