Jump to content

printing the filename with out extension


mrjameer

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.