What is wrong in this way of using PHP scandir() function?

QuestionsWhat is wrong in this way of using PHP scandir() function?
sethbeckerman5 Staff asked 4 years ago

I have been writing a simple PHP script for reading all files in a directory and show them but it show Unknown files, my files in images folder just two images but returning to me 4 result that first is "." (point) and second is ".." (double point).
these results are from where?
This is my PHP function :

and this is result:


View on Stack Overflow