Im trying to make the active page in the link/array system below to get red color when viewed, and the other pages (not active) to print out with normal link color.
How do I do this ?
<?php
$pages = array(
'Create' => 'create.php',
'Connect' => 'connect.php',
'Add' => 'add.php',
'View' => 'view.php',
'Edit' => 'edit.php',
'Delete' => 'delete.php',
'Shure' => 'shure.php',
'Search' => 'search.php',
'AllInfo' => 'allinfo.php',
'Counter' => 'counter.php',
'CreateDB' => 'createdb.php',
'DeleteDB' => 'deletedb.php'
);
foreach ($pages as $name => $url) {
if($url == $active) {
print "<a class=cd href='index.php?cat=filer/phpmysql/$url'><font color=red>$name</font></a> | ";
}
else {
print "<a class=cd href='index.php?cat=filer/phpmysql/$url'>$name</a> | ";
}
}
?>