我有 2 个数组。需要将两个数组合并/合并为 1 个数组。我不知道该怎么做。我的第一个数组如下所示:
Array
(
[A626] => Array
(
[name] => MUHAMMAD FIZMIE ZAKARIA
[email] => mfz@mail.edu.my
[empid] => A626
)
[A672] => Array
(
[name] => MOHD FARID ISMADI
[email] =>
[empid] => A672
)
[A1149] => Array
(
[name] => MOHD JAZLI BIN MOHD ZABRI
[email] => mjmz@mail.edu.my
[empid] => A1149
)
)
第二个数组是:
Array
(
[A1149] => Array
(
[empid] => A1149
[online] => 1
[ip] => 127.0.0.1
)
[A626] => Array
(
[empid] => A626
[online] => 0
[ip] =>
)
[A672] => Array
(
[empid] => A672
[online] => 0
[ip] =>
)
)
预期的结果应该是这样的:
Array
(
[A626] => Array
(
[name] => MUHAMMAD FIZMIE ZAKARIA
[email] => mfz@mail.edu.my
[empid] => A626
[online] => 0
[ip] =>
)
[A672] => Array
(
[name] => MOHD FARID ISMADI
[email] =>
[empid] => A672
[online] => 0
[ip] =>
)
[A1149] => Array
(
[name] => MOHD JAZLI MOHD ZABRI
[email] => mjmz@mail.edu.my
[empid] => A1149
[online] => 127.0.0.1
[ip] => 1
)
)
请帮我。谢谢你