I need help about file manipulation in PHP.
I have 4 file with known names and UNKNOWN extensions.
Like that:
Y923BBBB.E120506
Y924BBBB.E120606
Y925BBBB.E120706
Y926BBBB.E120806
and the file extensions changes everyday.
How i can cut or strip for every file the file extension, so that will stay only the names like that:
Y923BBBB
Y924BBBB
Y925BBBB
Y926BBBB
Anybody an idea?
Use strrpos to find the last
.and substr to get only the substring up to that point. To find the files and rename them, use glob and rename: