$a = ['a' => 'hi', 'b' => 'andrew'];
foreach ($a as $key => $val) {
if ($key == 'a') {
break;
}
echo $key;
echo $val;
// Result
'a';
'hi';
No comments:
Post a Comment