<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Bài 1 - Menu</title>
<style>
	li{
		list-style:none;
		margin-right:-3px;
		font-size:25px;
		border:3px solid green;
		float:left;
	}
	a{
		padding:0 10px;
		text-decoration:none;
		display:block;
	}
	a:visited{color:blue}
	a:hover{color:red}
</style>
</head>

<body>
	<?php
	$mang = array(
		array("id"=>"a1","ten"=>"Trang chủ"),
		array("id"=>"a2","ten"=>"Giới thiệu"),
		array("id"=>"a3","ten"=>"Sản phẩm"),
		array("id"=>"a4","ten"=>"Bản đồ"),
		array("id"=>"a5","ten"=>"Liên hệ")
	);?>    
	<ul style="padding:0">
    <?php foreach($mang as $mang1):?>
	<li id="<?php echo $mang1["id"]?>"><a href="btvn1.php?id=<?php echo $mang1["id"]?>"><?php echo $mang1["ten"]?></a></li>
    <?php endforeach;?>
    <div style="clear:both"></div>
    </ul>
    <?php
		if(!isset($_GET["id"]))
			$_GET["id"] = "a1";
	?>    
    <style>
		li#<?php echo $_GET["id"]?>{
			background-color:yellow;
		}
	</style>
    <?php
		foreach($mang as $mang1):
		if($mang1["id"] == $_GET["id"]){
			echo "<h2>Đây là ".$mang1["ten"]."</h2>";?>
	<?php } endforeach;?>
    
</body>
</html>