PHP pagination using glob to retrieve images
问题 I'm trying to retrieve images from a folder using glob() and i want it to be paginated so it only displays 3 images per page. From digging around on the internet and here on S.O. i've got the code below. The problem is that it only pulls three images from the directory and when i click on the next page it shows the same 3 images. What would be the best way to fetch different images for each page using glob? $imagesDir = 'uploadedImages/thumbs/*'; $itemsPerPage = 3; $currentPage = isset($_GET[