php function for nav-bar selection marking