Profile
Achievement
danielwrobert's Recent SnippetsTagged php
- All /
« Prev 1 Next »
Previously, I posted a little snippet I found on how to generate a special body class on each .php page. I, later, needed to get that body class and echo out a piece of HTML, which depended on my current page. So here is the snippet that I came up wi...
0
786
posted 13 years ago by danielwrobert
From an awesome comment on how you can use PHP to apply the unique ID to to the body element. This will return the name of the PHP file being executed as the ID (e.g. body id="index.php"). To leave off the .php part, just remove the ".php" part.
0
1006
posted 13 years ago by danielwrobert