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

download options for file handling / strip file extension

you can download the source as PHP file,

open the file as plain text in a new window or

get the code in a textarea to copy it.