<?php
$names = Array
(
16472 => "Ayham",
16483 => "Ameen",
15789 => "Bashir"
);
$grades = Array
(
'16472' => Array
(
"math" => 62,
"arabic" => 76,
"english" => 75
)
,
'16483' => Array
(
"math" => 85,
"arabic" => 71,
"english" => 82
)
,
'15789' => Array
(
"math" => 52,
"arabic" => 86,
"english" => 93
)
);
foreach($names as $key => $value){
foreach($grades as $k=> $v){
if($key == $k){
echo $value."<br>";
foreach($v as $gK => $gV){
echo $gK.":".$gV."<br>";
}
}
}
}
?>
حل التمرين