How to use foreach loop with associative array


<!DOCTYPE html>
<html>
<head>
<title>How to use foreach loop with associative array</title>
</head>
<body>
<?php
$student = array("ali"=>55,"asad"=>56,"ahmad"=>67);
foreach ($student as $key => $value) {
echo $key." has obtained ".$value." marks in english.<br/>";
}
?>
</body>
</html>