Return to Snippet

Revision: 49343
at July 20, 2011 12:11 by kreatific


Initial Code
<?php

	// Get the current page / file name and strip off the .php file type
	$current_page = basename($_SERVER[PHP_SELF], ".php");
	
	// Check to see if the current page is called services and echo class
	echo ($current_page == 'services' ? 'class="current"' : '');

?>

Initial URL


Initial Description


Initial Title
PHP - Current Page Name

Initial Tags
php

Initial Language
PHP