Return to Snippet

Revision: 45497
at May 2, 2011 20:22 by Envo


Initial Code
$filename = 'image.jpg';

$file = pathinfo($filename);
echo $file['extension']; // output: jpg

Initial URL
http://php.net/manual/en/function.pathinfo.php

Initial Description

                                

Initial Title
Get file extension

Initial Tags
php, file, extension

Initial Language
PHP