Jump to content
xisto Community
Sign in to follow this  
iGuest

Display Multi-Page, Images Reading From Directory

Recommended Posts

Hello I am trying to make a code where it reads from a Directory and display it in a page, when the Images in the directory are more than 10 it will show Page numbers "<back 1 2 Next>"

The code I got so far is, I hope some one can help me with that

<?phpecho "<table border=1><tr>";foreach(glob("thumbs/*.{jpg,JPG,jpeg,JPEG,gif,GIF,png,PNG}",GLOB_BRACE) as $images){echo "<td> <img src="".$images."" width=100 height=100> <br/>";}echo "</tr></table>";?>

Edited by moderator (see edit history)

Share this post


Link to post
Share on other sites

Here is a method from my gallery script that you can use to study (or copy) for your code: link.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.