【发布时间】:2018-08-11 12:16:20
【问题描述】:
我有两个类似的数组:
$result = ["should" => 1];
$result1 = ["must" => 4, "should" => 3];
我需要这样的单个数组的结果:
["should" => 1, "must" => 4, "should" => 3]
我得到了这个结果:
["should" => [1,3], "must" => 4]
【问题讨论】:
-
不可能有两次相同的密钥。
标签: php arrays multidimensional-array associative-array