How to get the extention of the file with php with strrchr function
Saturday, November 10th, 2007Hi guys,
With this code you can get the extension of a file. This is very simple and useful.
-
$ext = strrchr($file,".");
If the value of $file is “/files/games/mathattach.swf” the value of $ext will be “.swf”;
Posted in Php, tip | No Comments »

