title: getting column data from array
body: <p>I have an array as follows</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [route_id] =&gt; 2/2A
              [direction] =&gt; right
              [bus_stop_count] =&gt; 1
              [bus_id] =&gt; Array
                  (
                      [0] =&gt; 1000
                      [1] =&gt; 1002
                  )
  
          )
  
      [1] =&gt; Array
          (
              [route_id] =&gt; 1
              [direction] =&gt; right
              [bus_stop_count] =&gt; 1
              [bus_id] =&gt; Array
                  (
                      [0] =&gt; 1004
                  )
  
          )
  
  )
  </code></pre>
  
  <p>I want to get an array for <code>bus_id</code> like the following</p>
  
  <pre><code>Array
  (
      [0] =&gt; 1000
      [1] =&gt; 1002
      [2] =&gt; 1004
  )
  </code></pre>
  
  <p>Here is what i tried so far</p>
  
  <p><code>$bus_ids = array_column($array, 'bus_id');</code></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; 1000
              [1] =&gt; 1002
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; 1004
          )
  
  )
  </code></pre>