LuckyBambu Posted November 16, 2006 Share Posted November 16, 2006 [code]<? $path = 'images'; $i = 0; $imgDir = opendir ($path); while ( $file = readdir( $imgDir ) ) { $file_type = strrchr( $file, "." ); $is_image = eregi( "jpg|gif",$file_type ); if ( $file != '.' && $file != '..' && $is_image ) { print("<img src=\"" . $path . "/" . $file . "\" alt=\"Image\" class=\"listimg\" /><br />\n<input type=\"text\" class=\"images-code\" value=\"<a href="http://www.ishmoo.com" alt="Ishmoo - Myspace Resource" /><img src="http://www.ishmoo.com/Images/Family_Guy/images/" . $file . "" /></a>\"\n/>"); } } closedir ($imgDir); ?>[/code]So I have this lovely code, derived from one of the examples on this site, being used for my new MySpace site. However, I'd rather not display all of the 500 someodd images that will be in one directory at a time, more like 5 per page. How would I go about doing something like this? I've done it with PHP/MySQL before, but never really had a grasp on it, and have never tried it with a list of files, either.Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/27523-pagination-on-images-from-directory/ Share on other sites More sharing options...
LuckyBambu Posted November 17, 2006 Author Share Posted November 17, 2006 *Bump*Any help on this please? Link to comment https://forums.phpfreaks.com/topic/27523-pagination-on-images-from-directory/#findComment-126360 Share on other sites More sharing options...
LuckyBambu Posted November 20, 2006 Author Share Posted November 20, 2006 *Bump*Final one... I modified the title of the thread to maybe be a bit clearer. Link to comment https://forums.phpfreaks.com/topic/27523-pagination-on-images-from-directory/#findComment-127418 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.