Logo

Programming-Idioms

History of Idiom 13 > diff from v4 to v5

Edit summary for version 5 by :

Version 4

2015-08-18, 13:37:58

Version 5

2015-08-19, 07:39:48

Idiom #13 Iterate over map keys and values

Print each key k i with its value x from an associative array mymap

Idiom #13 Iterate over map keys and values

Print each key k i with its value x from an associative array mymap

Code
foreach ($mymap as $k=>$x)
{
    echo "Key=$k, Value=$x <br>";
}