我有一個關聯數組(實際上是一個Laravel收集)這種結構:結合關聯數組的孩子一個
array(3) {
[0] => array(4) {
["firstname"] => string(21) "John"
["lastname"] => string(0) ""
["email"] => string(0) ""
["uri"] => string(0) ""
}
[1] => array(4) {
["firstname"] => string(0) ""
["lastname"] => string(22) "Smith"
["email"] => string(0) ""
["uri"] => string(0) ""
}
[2] => array(4) {
["firstname"] => string(0) ""
["lastname"] => string(0) ""
["email"] => string(19) "[email protected]"
["uri"] => string(0) ""
}
}
我怎麼能結合整個事情與自己,所以我結束了以下?
預期輸出:
array(3) {
[0] => array(4) {
["firstname"] => string(21) "John"
["lastname"] => string(0) "Smith"
["email"] => string(0) "[email protected]"
["uri"] => string(0) ""
}
}
我相信這是一個沒有腦子,但現在我很懷念樹不見林...在此先感謝。