Last active
August 29, 2015 13:56
-
-
Save aswebdev/3f78c8882b2f7944262c to your computer and use it in GitHub Desktop.
Append an append string to a filename
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
// Append to a filename | |
function appendToFilename($file,$append) { | |
return preg_replace('/(\.[^.]+)$/', sprintf('%s$1', $append), $file); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment