how to loop a dictionary in php code example Example: loop over keys and values php foreach ($arr as $key => $value) { echo $key; }