foreach($array as $value) simply means, for every element in the array, assign its value to $value.
foreach($array as $key => $value) assigns the index of the array to $key and value of that index to $value.
:S I hope I am not confusing you!
This is almost similar to for loop.
for($i=0;$i<count($array);$i++) {
echo "Key is".$i."Value is".$array[$i];
}
//is same as
foreach($array as $key =>$value) {
echo "Key is".$key."Value is".$value;
}