AS stated, this is a job for CSS + oh man, you code is wrong. Try something like this instead:
$string = '<ul>
<li><a href="' . $FromPage . '">Back</a></li>
<li><a href="Talent_Hire.php">Hire</a></li>
<li><a href="Talent_Hire.php">Hire</a></li>
<li><a href="Talent_Hire.php">Hire</a></li>
<li><a href="Talent_Hire.php">Hire</a></li>
</ul>';
echo $string;
And in you CSS file:
/** This will work only for tags `a` inside a `li` that is inside an `ul` tag.
For all `a` tags, just remove the `ul` `li` part **/
ul li a:visited { background-color: #ff0000; }
0
solved How to change menu link color when it is clicked [closed]