mrjameer Posted March 21, 2007 Share Posted March 21, 2007 hi, i want to print the file name with out extension.here is my code for getting the extension.but how i can get only file name without extension <?php $file = "welcome.txt"; $aFile = explode(".", $file); $ext = array_pop($aFile); echo $ext; ?> any of your idea will be appreciated. thanks mrjameer. Link to comment https://forums.phpfreaks.com/topic/43712-printing-the-filename-with-out-extension/ Share on other sites More sharing options...
per1os Posted March 21, 2007 Share Posted March 21, 2007 http://us3.php.net/manual/en/function.basename.php Link to comment https://forums.phpfreaks.com/topic/43712-printing-the-filename-with-out-extension/#findComment-212206 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.