PHP, button to control display image in an array -
i have php-code, reading images folder array. need display images, 1 one, controlled button. past part of php, displaying 1 of images, test code working. need code display 1 of images @ time, stop each image-displayed, , continue when next-button clicked. loop of kind, button controll displaying of images. can show me how done ?
the code this:
<!doctype html> <html> <body> <?php // open directory $mydirectory = opendir("images"); // each entry while($entryname = readdir($mydirectory)) { $dirarray[] = $entryname; sort($dirarray); } // close directory closedir($mydirectory); // count elements in array $indexcount = count($dirarray); ?> <?php $index = 7; echo '<li><img src='.$dirarray[$index].' '; ?> </body> </html>
Comments
Post a Comment