I have an associative array in php. When I make dying on it, I get the correct values as follows:
array(1) { [0]=> array(1) { [123]=> string(5) "Hello" }}
But when I try to extract the keys of this array into a new array, then I cannot get the keys:
$uniqueIds = array_keys($myAssociativeArray); die(var_dump($uniqueIds)); int(0) array(1) { [0]=> int(0) }
Can someone tell me what I'm doing wrong here? I want to get all the keys from my associative array. And for this, I mean the stream: php: how to get an associative array of keys from a numeric index?
source share