Merging arrays based on a value of the key

前端 未结 9 1341
予麋鹿
予麋鹿 2020-12-19 09:03

I have two arrays of arrays that have an id key, and I\'d like to merge the data together based on that array\'s key and key value. The data would look somethin

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-19 09:32

    Use array_replace_recursive function for easy and fast way

    array_replace_recursive($color, $size)
    

提交回复
热议问题