我陣列1:如何在PHP中連接數組值?
Array
(
[0] => Array
(
[recomendation_id] => 3588
[employee_id] => 90141063
[attendance_type_id] => 2
[start_dtm] => 2016-05-17 10:32:00
[end_dtm] =>
[request_message] => test notif
[recomendation_status_id] => 1
[last_update_dtm] => 2016-05-17 10:32:43
[employee_name] => Nike Yulistia Angreni
[attd_type_name] => Permittance
[status_name] => Request
)
)
而且陣列2:
Array
(
[0] => Array
(
[valuator1] => Wulan Lastia Permana
)
)
我想在一個數組的數組值。我想要這樣的結果:
Array
(
[0] => Array
(
[recomendation_id] => 3588
[employee_id] => 90141063
[attendance_type_id] => 2
[start_dtm] => 2016-05-17 10:32:00
[end_dtm] =>
[request_message] => test notif
[recomendation_status_id] => 1
[last_update_dtm] => 2016-05-17 10:32:43
[employee_name] => Nike Yulistia Angreni
[attd_type_name] => Permittance
[status_name] => Request
[valuator1] => Wulan Lastia Permana
)
)
這樣可以加入嗎?
有趣。我不知道這些功能。 'array_replace_recursive'不會覆蓋舊值嗎?還是它可以添加新的值? – Peter
非常感謝!它完美的工作 –
@Peter'array_replace_recursive'將取代舊值 – Thamilan