Remove first levels of identifier in array

前端 未结 7 1003
天涯浪人
天涯浪人 2020-12-15 11:25

I think this has been up before, but could\'nt find any answer to it. If it\'s already answered please point me in the right direction with a link.

I have an array t

7条回答
  •  有刺的猬
    2020-12-15 11:47

    PHP array_column

    $new_array = array_column($old_array,0);
    

    This will retrieve the value at index 0 for each array within $old_array. Can also be using with associative arrays.

提交回复
热议问题