Basically, it is used to assign the array element's key value and associates it with the element itself...
So, f you have an array like this:
$arrayname = array("Name" => "John", "Address" => "123 Any Street", "City" => "Town");
Then, if you ran the foreach loop in your example...
foreach ( $arrayname as $keyname => $valuename ){
echo $keyname.": ".$valuename."<br />";
}
Then, you would have an output like this:
Name: John
Address: 123 Any Street
City: Town
I hate to use an example to try to explain it, but I don't know how to explain it any other way... It just associates the array element's key with the array element itself...