This code can be used to remove an extension from the file name using php.
If manipulated abit, it can also be used to find the extension of php and echo it.
$ext = strrchr($strName, ‘.’);
if($ext !== false)
$strName = substr($strName, 0, -strlen($ext));
$Name = ‘file.txt’;
However, in my case, i tried using it with a bunch of code but wasn’t successful, it did removed the extension of the file name but it caused the remaining code to stop executing. I didn’t work out on why it caused it as was busy in some more important part of that code.