/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // Get the current page / file name and strip off the .php file type // Check to see if the current page is called services and echo class echo ($current_page == 'services' ? 'class="current"' : ''); ?>