I have an array whose values are image names:
Array
(
[rocks] => rocks.jpg
[stone] => stone.jpg
[bird] => bird.jpg
...
)
I want to scan 3 directories which are all in the same folder and match any images that match any of the array's values. The directory structure is like:
images
nature
animals
misc.
I know about scandir() but am unsure of how to account for more than one directory. I eventually want to copy these matched images into a new directory. Would this be possible with PHP?
Any ideas or examples would be very helplful.
Thanks.
find . -name 'rocks.jpg'(and execute that viaexec())glob. And therefore it remains 'OS independent'