How to extract file name from given URL ? | ||
| ||
| CODE $string = substr($string,strrpos($string,'/')+1); Then, if you want to get the file extension, do the same thing for the . Because there can be more . in a file name you also search for the latest occurence. CODE $string = substr($string,0,strrpos($string,'.')); And there you have it.. | ||
| | ||
| |