php functions
Posted in
204
3:18 am, October 24, 2021
php get file extension from a file name
this function returns the file extention, however if the file name has multiple . in it this will return a false value.
php get file extension from a file name Demo
View Demo Full Screen View Demo New Tab
php get file extension from a file name Code
PHP
function get_file_extension($file_name) {
return substr(strrchr($file_name,'.'),1);
}
$my_filename = "kruxor.txt";
echo get_file_extension($my_filename);
Add Comment
Other Items in php functions
Related Search Terms
Other Categories in Code
php functions
php functions
php functions