/ Published in: PHP
This code allows to pass filename in the $file_name variable and function will return file extension only.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function get_file_extension($file_name) { /* may contain multiple dots */ return $extension; } ?>
URL: http://www.apphp.com/index.php?snippet=php-get-file-extension