Get File Extension in PHP

This code allows to pass filename in the $file_name variable and function will return file extension only.

Usage

echo get_file_extension('my_file.php');

 

Comments