PHP - Get the file extension (basename?)

Posted by Pete on Stack Overflow See other posts from Stack Overflow or by Pete
Published on 2009-08-29T14:17:45Z Indexed on 2010/05/23 14:00 UTC
Read the original article Hit count: 253

Filed under:
|
|

Hello there!

If I have a code like this:

$file = basename($filename);

How do i get the file extension of $file? The variabel file could contain any kind of file, like index.php or test.jpeg.

© Stack Overflow or respective owner

Related posts about php

Related posts about file