saya coba buat:
tapi malah ga bisa mas. dimana salahnya?
PHP:
<?php
$here = basename($_SERVER['SCRIPT_FILENAME']);
$pages = array('index.php', 'about.php', 'contact.php');
$current = array_search($here, $pages) === false ? 'current' : 'none';
?>
<ul>
<li class="<?php echo $current; ?>"><a href="index.php">Home</a></li>
<li class="<?php echo $current; ?>"><a href="about.php">About</a></li>
<li class="<?php echo $current; ?>"><a href="contact.php">Contact</a></li>
</ul>
tapi malah ga bisa mas. dimana salahnya?