I am trying to figure out a way through php to:
1) Get the name of the current page through it's url http://website.com/videos/a-great-video
2) Add it as a class to the body
<body class="a-great-video"></body>
3) I'm trying to create a PHP variable for the current page name but not sure how to grab it with PHP. The class will be added through PHP or at least that's the goal. If you have another way of doing this, please feel free.
Setup Information:
The server runs Apache 2.0 and uses mod_rewrite.
Example URL: http://localhost:8888/romwod/members/signup
What I'm trying to get: "signup" or "members-signup"