note 48121 deleted from function.eregi-replace by tularis
| From: | tularis@php.net | Date: | Sun, 12 Dec 2004 21:37:57 +0000 |
| Subject: | note 48121 deleted from function.eregi-replace by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-81731@lists.php.net to get a copy of this message | ||
Note Submitter: brent at netins dot net
----
When Displaying php filenames of the current displayed file, I did not want the extension to show. I
found eregi_replace handy. Maybe some one else can get use of this too:
<?
$me = $_SERVER['PHP_SELF']; //get file path
$Apathweb = explode("/", $me); // get filename after dir path
$myFileName = array_pop($Apathweb);
$var = eregi_replace(".php+", " ", $myFileName); //replace php extensions with
nothing
echo "<font size=5><b>$var</b></font>"; //display the filename
with no extension
?>
- Brent Russell, Des Moines Iowa
----
Reason: useless example