Quote:
Originally Posted by INever
Thnx. Will print and save this page.
I admit I'm at the Paul Markam level of coding ability but isn't there something simple like:
<script> xyxabnd rotate images from <a href="https://image-files.domain.com" #images interval in seconds# </script></a>
|
this will use glob to get a list of images and output the html markup (of course you will need to use the proper markup for the js slideshow)
Code:
<?php
$path = 'images/';
$file_types = ['*.jpg', '*.png', '*.gif'];
$images = [];
foreach ($file_types as $file_type) {
foreach (glob($path . $file_type) as $file) {
$images[$file] = $path . basename($file);
};
}
foreach ($images as $i) {
echo sprintf('<a href="%s"><img src="%s" alt="%s" /></a>', $i, $i, basename($i));
}