I have a file I am including on multiple pages.
What I want to do is determine the page name of the current page is and run code based on that.
Is there a php function to get the page name?
I can do it in Javascript, but as we all know, I can't use Javascript in php.
Here the Javascript version:
var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
alert(sPage); <--- displays alert with page name
Thanks!