foreach statement is used to loop through an associative array
<?php
$emp_det = array (Name => "A",
Age => "2" ,
Code =>"8",
Designation => "Administrator");
foreach ($emp_det as $key=>$temp) {
echo "$key = $temp","\n";
}
?>
Related examples in the same category