BluApple Posted 20 hours ago Share Posted 20 hours ago I'm stuck on this code: <div class="gallery"><?php $images = glob(FOLDER A); foreach ($images as $i) { printf("<img src='FOLDER A...'>"); } ?></div> https://code-boxx.com/simple-php-image-gallery/ What needs to be replaced in "FOLDER A" do I need forward slashes? ("/") Tutorial here: https://code-boxx.com/simple-php-image-gallery/ Quote Link to comment https://forums.phpfreaks.com/topic/327568-trying-to-use-glob-function-to-create-gallery/ Share on other sites More sharing options...
Barand Posted 16 hours ago Share Posted 16 hours ago <?php $images = glob("path/to/folder a/*.*"); foreach ($images as $i) { echo "<img src='$i'>"; } Quote Link to comment https://forums.phpfreaks.com/topic/327568-trying-to-use-glob-function-to-create-gallery/#findComment-1653521 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.