title: PHP: how to make a nested array into one dimensional array?
body: <p>This is a nested array I got from my db,</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [Field] =&gt; blc_id
              [Type] =&gt; int(10) unsigned
              [Null] =&gt; NO
              [Key] =&gt; PRI
              [Default] =&gt; 
              [Extra] =&gt; auto_increment
          )
  
      [1] =&gt; Array
          (
              [Field] =&gt; blc_email
              [Type] =&gt; varchar(255)
              [Null] =&gt; YES
              [Key] =&gt; 
              [Default] =&gt; 
              [Extra] =&gt; 
          )
  
      [2] =&gt; Array
          (
              [Field] =&gt; cat_id
              [Type] =&gt; varchar(255)
              [Null] =&gt; YES
              [Key] =&gt; 
              [Default] =&gt; 
              [Extra] =&gt; 
          )
  
      [3] =&gt; Array
          (
              [Field] =&gt; blc_created
              [Type] =&gt; timestamp
              [Null] =&gt; NO
              [Key] =&gt; 
              [Default] =&gt; 0000-00-00 00:00:00
              [Extra] =&gt; 
          )
  
      [4] =&gt; Array
          (
              [Field] =&gt; blc_updated
              [Type] =&gt; timestamp
              [Null] =&gt; NO
              [Key] =&gt; 
              [Default] =&gt; CURRENT_TIMESTAMP
              [Extra] =&gt; on update CURRENT_TIMESTAMP
          )
  
  )
  </code></pre>
  
  <p>How can I use foreach loop to get the result below,</p>
  
  <pre><code>Array
  (
      [0] =&gt; blc_id
      [1] =&gt; blc_email
      [2] =&gt; cat_id
      [3] =&gt; blc_created
      [4] =&gt; blc_updated
  )
  </code></pre>
  
  <p>Here is my code so far but of course it doesnt return the result correctly,</p>
  
  <pre><code>foreach($items as $outer_key =&gt; $array)
  { 
      foreach($array as $inner_key =&gt; $value)
      { 
          $field_name[] = $value; 
      } 
  } 
  </code></pre>
  
  <p>Thanks.</p>