string(8) "美国骗局" }">
时间:2021-07-01 10:21:17 帮助过:4人阅读
$a = array( array("201410090343", "美国骗局"), array("201410090344", "不再说分手"), array("201410090345", "闺蜜"),);foreach($a as $v) $b[$v[0]] = $v;$a = $b;var_dump($a);
array(3) { ["201410090343"]=> array(2) { [0]=> string(12) "201410090343" [1]=> string(8) "美国骗局" } ["201410090344"]=> array(2) { [0]=> string(12) "201410090344" [1]=> string(10) "不再说分手" } ["201410090345"]=> array(2) { [0]=> string(12) "201410090345" [1]=> string(4) "闺蜜" }}
$list1 = array(
array("201410090343","美国骗局"),array("201410090344","不再说分手"),array("201410090345","闺蜜"),
);
$list2 = array();
foreach($list1 as $key=>$val){
$list2[$val[0]] = $val;
}
echo '