<div id="nav">
	<nav>
        <?php

            $links = [
                ["/", "Home"],
                ["/about", "About"]
            ];

            $path = parse_url("http://test" . $_SERVER["REQUEST_URI"])["path"];

            foreach ($links as $link) {
                $is_selected = $link[0] == $path || $link[0] == rtrim($path, '/');
                echo
                    $is_selected ?
                        "<span class='container nav-button nav-button-selected'>$link[1]</span>" :
                        "<a href='$link[0]' class='container nav-button nav-button-not-selected'>$link[1]</a>";
            }
        
        ?>
	</nav>
</div>
