title: How to get all keys out of associative array in php
body: <p>I have an associative array in php. When I am doing a die on it, then I am getting proper values as follows: </p>
  
  <pre><code>array(1) { [0]=&gt; array(1) { [123]=&gt; string(5) "Hello" }}
  </code></pre>
  
  <p>But when I am trying extract out keys of this array into an new array, then I am not able to get keys out:</p>
  
  <pre><code>$uniqueIds = array_keys($myAssociativeArray);
  die(var_dump($uniqueIds));
  int(0) array(1) { [0]=&gt; int(0) } 
  </code></pre>
  
  <p>Can any one tell me what I am doing wrong here? I want to get all the keys out of my associative array. And for this, I am referring to thread: <a href="https://stackoverflow.com/questions/4095796/php-how-to-get-associative-array-key-from-numeric-index">php: how to get associative array key from numeric index?</a></p>