php - Is it possible to count the number of keys in an array?
arrays, php
Solution
The number of keys in the array will always be the number of elements in the array, as the keys must be unique. So:
$numKeys = count($array);
Problem
I've googled this but found no answers, so I guess it's not possible. If there is a way, I'd love to know it. Thanks