laserlight is right.
"looping" arrays and getting both the "key" and "value" is a basic feature of PHP.
function MyFunction($array)
{
foreach ($array as $key => $value) echo "$key=$value<br>";
}
MyFunction(array(
"apple" => "fruit",
"holden" => "car",
"rock" => "hard"
))