/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function setBodyId() { $path = $_SERVER['REQUEST_URI']; $bodyId = ‘about’; $bodyId = ‘blog’; $bodyId = ‘contact’; $bodyId = ‘work’; $bodyId = ‘play’; } else if ($path == â€) { $bodyId = ‘home’; } else { $bodyId = ‘general’; } } return $bodyId; } $bodyID=setBodyId(); ?> <body id="<?=$bodyID?>">