Highslide gallery with php
Go to solution
Solved by Jckf,
You seem to be confused. What you're doing here is dumping 273 strings inside the href and src attributes of your elements, instead of what I assume you want to do, which is loop over some image files in a directory, and echo out anchor and image elements for them. The following code demonstrates a simple loop:
<?php foreach (glob($img_dir . "/*") as $filepath) { $filename = basename($filepath); ?> <a href="path/to/image/<?= $filename ?>"> <img src="path/to/thumb/<?= $filename ?>"> </a><?php } ?>

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now