title: How can i get sub array value to main array key? [Php]
body: <p>I have an array. This array have a sub arrays. I want to take sub array value to main array keys. Here is my example array: </p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [index-id] =&gt; 12
              [title] =&gt; Example Title
              [description] =&gt; Example Description
          )
      [1] =&gt; Array
          (
              [index-id] =&gt; 32
              [title] =&gt; Example Title
              [description] =&gt; Example Description
          )
  )
  </code></pre>
  
  <p>i want to take <em>index-id</em> to <strong>main array key</strong> my array must be like this</p>
  
  <pre><code>Array
  (
      [12] =&gt; Array
          (
              [index-id] =&gt; 12
              [title] =&gt; Example Title
              [description] =&gt; Example Description
          )
      [32] =&gt; Array
          (
              [index-id] =&gt; 32
              [title] =&gt; Example Title
              [description] =&gt; Example Description
          )
  )
  </code></pre>
  
  <p>How can i do this?</p>