Created
September 29, 2012 20:40
-
-
Save wesleybliss/3805136 to your computer and use it in GitHub Desktop.
File Name & Extension Parsing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get a file's extension | |
$ext = array_pop( explode( '.', $fileName ) ); | |
// Get a file's name without extension | |
$name = array_shift( explode( '.', $fileName ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment