Today i have a problem with my script, my script should search for (.css files)
I\'ve used a code to:
You say you are sure that your array is not empty, but what the Invalid argument supplied for foreach() error message means is that it is not even an array. Try it youself if you don't believe it:
var_dump($add);
Most likely, there was an error finding files and glob() is returning FALSE
:
Returns an array containing the matched files/directories, an empty array if no file matched or FALSE on error.