$languages = array ("a" => "A",
"b" => "B",
"q" => "Q");
print "";
reset ($languages);
$hd1 = key ($languages);
$hd2 = $languages[$hd1];
print "$hd1 $hd2 ";
next($languages);
while ( list ($ctry,$lang) = each ($languages)) :
print "$ctry $lang ";
endwhile;
print "
";
?>