我在找一个功能,如果有的话, 来保存或整合价值 成类似的钥匙, 但到目前为止没有运气。
"http://www.php.net/manual/en/formation.array-combine.php" rel="nofollow" >arry_combine 简单地删除了值 :
array_combine(array( a , a , b ), array(1,2,3));
<强 > 返回: 强>
Array
(
[a] => 2
[b] => 3
)
<强 > 预期: 强>
Array
(
[a] => 1,2
[b] => 3
)
任何提示都非常感激。
谢谢 谢谢
UPDATE: I didn t know, and didn t articulate better about the merged values (1,2), but then I had better accepted Jeroen array of values for easier breakdowns of possible array of values. 谢谢 谢谢 to everyone who has kindly helped.