'Home', 'about' => 'About Us', 'contact' => 'Contact Us' ); $current_page = 'home'; // set this dynamically based on the current page echo '
$menu = array( array( 'title' => 'Home', 'url' => '/' ), array( 'title' => 'Products', 'url' => '/products', 'children' => array( array( 'title' => 'Product 1', 'url' => '/product/1' ), array( 'title' => 'Product 2', 'url' => '/product/2' ) ) ), array( 'title' => 'About Us', 'url' => '/about' ), array( 'title' => 'Contact', 'url' => '/contact' ) ); function buildMenu($menu) { echo '