Navigation downstate

Hi Kirupa community!
I’m trying to nail a downstate navigation menu with PHP…
By this I mean having a menu section darkened once your on the selected page.
So far no luck, any trick and tips?