I am using WordPress. I have an image folder like mytheme/images/myimages.
mytheme/images/myimages
I want to retrieve all the images name from the folder myimages
myimages
Please advice me, how can I get images name.
try this
$directory = "mytheme/images/myimages"; $images = glob($directory . "/*.jpg"); foreach($images as $image) { echo $image; }
1.4m articles
1.4m replys
5 comments
57.0k users