get the file extension of a filename in a string


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function get_file_extension($file_name) {
  2. return substr(strrchr($file_name,'.'),1);
  3. }

URL: http://davidwalsh.name/php-function-get-file-extension-string

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.