title: How to remove parent array index from array
body: <p>I want to remove parent array index in array.</p>
  
  <p>Following is my array.</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [id] =&gt; 296
                      [username] =&gt; David0123
                      [profile_slug] =&gt; david-love
  
  
                  )
  
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [id] =&gt; 297
                      [username] =&gt; Anne_wils
                      [profile_slug] =&gt; anne-chase
  
  
                  )
  
          )
  
      [2] =&gt; Array
          (
              [0] =&gt; Array
                  (
                      [id] =&gt; 300
                      [username] =&gt; malina001
                      [profile_slug] =&gt; malina-reid
  
  
                  )
  
          )
  
  )
  </code></pre>
  
  <p>And I want like this way..</p>
  
  <pre><code>Array(    
       [0] =&gt; Array
              (
                  [id] =&gt; 296
                  [username] =&gt; David0123
                  [profile_slug] =&gt; david-love
         )    
       [1] =&gt; Array
              (
                  [id] =&gt; 297
                  [username] =&gt; Anne_wils
                  [profile_slug] =&gt; anne-chase
              )    
      [2] =&gt; Array
          (
              [id] =&gt; 300
              [username] =&gt; malina001
              [profile_slug] =&gt; malina-reid
          )
  )
  </code></pre>
  
  <p>I used following script for it but not work.</p>
  
  <pre><code>$myMainArray = json_decode(json_encode($allEscorts),true);
  $i=0;
  foreach( array_values($myMainArray) as $k=&gt; $val){
              echo $val[$i]['id'];    
              $i++;
  }
  </code></pre>
  
  <p>I want to display data each element but first i have to remove parent array indexes.</p>