You could do something like this
foreach(array_keys($array) as $key) {
// do your stuff
}
That would make the foreach iterate over an array consisting of the keys from your array instead of the actual array. Note that it’s probably not better from a performance standpoint though.