array_column:將一個多維數組的轉換爲一個鍵值對數組

array_column( array $input , $column_key , $index_key) 第一個參數爲原始數組,第二個參數(多維數組鍵名)爲新數組的值,第三個參數(多維數組鍵名)爲鍵.結果爲一個鍵值對數組php $array = [      [ 'id' => 1, 'name' => 'tom' , 'age' => 18],      [ 'id' => 2, 'name
相關文章
相關標籤/搜索