我正在尝试展平一个数组,以便删除重复项并保留唯一值。例如:
$places = array(
array("United Kingdom","London","Camden","1"),
array("United Kingdom","London","Camden","5"),
array("United Kingdom","London","Camden","23"),
array("United Kingdom","London","Camden","71")
);
会成为:
$places = array("United Kingdom","London","Camden","1,5,23,71");
或者
$places = array('Country' => 'United Kingdom',
'County' => 'London',
'City' => 'Camden',
'Codes' => array(1,5,23,71)
);