this php code will strip the extension from a filename.
to remove the extension just call the function with the name of the file

this php code will strip the extension from a filename. to remove the extension just call the function with the name of the file

the filename without extension:
file_name

the file extension:
txt