This is a quick and easy way to determine which page you’re currently on, and then setting your menu button’s overlay based on that page.

First we need to create a function to determine the page we’re on.
function getCurrPage() {
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}

Next we need to check our this against the menu.
$thisPage = getCurrPage();
if($thisPage == 'index.php') { $navHome = '[Current Class]'; } else { $navHome = '[Noncurrent Class]'; }
if($thisPage == 'search.php') { $navSearch = '[Current Class]'; } else { $navSearch = '[Noncurrent Class]'; }
if($thisPage == 'about.php') { $navAbout = '[Current Class]'; } else { $navAbout = '[Noncurrent Class]'; }
if($thisPage == 'faq.php') { $navFAQ = '[Current Class]'; } else { $navFAQ = '[Noncurrent Class]'; }
if($thisPage == 'contact.php') { $navContact = '[Current Class]'; } else { $navContact = '[Noncurrent Class]'; }

After everything’s been checked, you can simply set your menu as-needed.
echo $navHome . $navSearch . $navAbout . $navFAQ. $navContact;

If you’re dealing with a dozen or more menu links, it would be more efficient to create an array to scan and verify the current page, but this will work fine for smaller menus. Enjoy.