Php script to insert into the html of all the images in folder path?

Prompt, please, as with POM. php to replace the functionality of the html tag "img"?
The idea is to have a folder of images, the php code inserts the images into the html.

Details: we want to implement a simple interface to add from the admin of the new image - the admin will only need to put img in a folder on the server.
June 14th 19 at 18:02
1 answer
June 14th 19 at 18:04
Solution
Good night.
This can be done using the function scandir.
Thanks for the reply, but I would like to clarify a little bit:
with scandir I got a list of all files in the folder. Broke them into separate, checked the extension - it's OK. But now how to insert them in the markup as an image? Just, for example, a cycle with the substitution of the src attribute in the img? - Beulah_Lindgren commented on June 14th 19 at 18:07
Yes , just cycle with img - reagan.Trantow commented on June 14th 19 at 18:10

Find more questions by tags PHP