You can do:
foreach ($arr as $key => $value) { echo $key; }
As described in PHP docs.
1.4m articles
1.4m replys
5 comments
56.9k users