Hey guys, been a long time since ive posted here but im after a little help.
I have a foreach loop running on my page displaying all images in a folder using the following code:
PHP Code:
echo "<table width=\"50%\" border=\"0\" align=\"center\"> "; echo "<tr>"; $i=0; foreach (glob("events/$dire/*.jpg") as $image) {
$i++; echo "<td><div align=\"center\"><img class=\"photo\" src=\"$image\" alt=\"\"></div><div align=\"center\" class=\"style6\">Price: £30</div></td>"; if ($i == "3") { echo "</tr> <tr>"; $i="0"; } } echo "</tr> </table>";
Now some folders have more than 200 images so i need to be able to paginate them. Is there an easy way to do it? I dont really want to have to do it with a database as the folders content is always changing and i dont want to have to update the database each time.
Thanks.
Scott
Last edited by SpottyDog; 07-23-2008 at 02:45 PM..
|