Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get extension from string

$ext = pathinfo($filename, PATHINFO_EXTENSION);

//Remember that if you want to be able to deal with non ASCII characters, you need to set the locale first. E.G:
setlocale(LC_ALL,'en_US.UTF-8');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #extension #string
ADD COMMENT
Topic
Name
1+4 =