bigthink
-
Posts
5 -
Joined
-
Last visited
Never
Posts posted by bigthink
-
-
I think everytime I have a problem I'm just going to immediately come post in here because within minutes of posting I ALWAYS find the answer.
In case you are wondering, too:
[code] <?
$clean = explode("/",$_SERVER["SCRIPT_NAME"]);
$clean=explode(".",$clean[1]);
$clean=$clean[0];
echo $clean;
?>[/code]
That will do it again! -
Ok, so here's the new problem. The frustrating thing is I had the answer and then accidentally deleted it! ARGH.
Anyway this is what I have:
[code] <?
$fullpath = $_SERVER["PHP_SELF"];
$filename = substr(strrchr($fullpath, "/"), 1);
echo $filename
?>[/code]
When it echos the $filename it prints out : pagename.php
How can I echo just "pagename" without the .php tag?
Your help is always appreciated and I'll keep looking in the meantime!
How Can I Delete the .php in my echo statement?
in PHP Coding Help
Posted
That just gives me part of the page title. What in the heck?
Anyone have an answer that works? :)