I want to do following 2 things:
1) Retrieve the list of all files in a directory.
2) and then remove their extensions.
e.g.: If I get a list of files as A.png, B.png, C.jpeg, D.txt, I want to get A,B,C,D.
How do I do that in php?
I want to do following 2 things:
1) Retrieve the list of all files in a directory.
2) and then remove their extensions.
e.g.: If I get a list of files as A.png, B.png, C.jpeg, D.txt, I want to get A,B,C,D.
How do I do that in php?
Check out the glob function for directory listing, and use this for removing the extension: