ted_chou12 Posted March 18, 2007 Share Posted March 18, 2007 If: $ext = strtolower(substr(strrchr($filename,"."), 1)); That is the file extension, how do you get everything before that? (the file name) Ted THanks Quote Link to comment https://forums.phpfreaks.com/topic/43214-get-filename/ Share on other sites More sharing options...
The Bat Posted March 18, 2007 Share Posted March 18, 2007 You just want to get the file name before the period? A simple $ext = explode('.', $filename); echo $ext[0]; should suffice. Quote Link to comment https://forums.phpfreaks.com/topic/43214-get-filename/#findComment-209808 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.