How do I check if the files exists in my array if I want to delete them with array_map + unlink
:
// deletes all jpg files in that path
array_map('unlink', glob($path."/*.jpg"));
Right now if the folder does not contain any .jpg files I get an error, because there is nothing to unlink I want to catch that.