如题所述
第1个回答 2009-02-11
<?php
$array1=array(1, 2);//数组1
$array2=array(2, 3);//数组2
$array3=array_merge($array1, $array2);//合并数组;
$array3=array_unique($array3);//移除数组中重复的值
?>
$array1=array(1, 2);//数组1
$array2=array(2, 3);//数组2
$array3=array_merge($array1, $array2);//合并数组;
$array3=array_unique($array3);//移除数组中重复的值
?>
第2个回答 2020-05-20
<?php
$arr1=array("a","b","c");
$arr2=array("c","d","e");
$myarray=array_merge($arr1,$arr2);
print_r($myarray);
$myarray=array_unique($myarray);
print_r($myarray);
?>
$arr1=array("a","b","c");
$arr2=array("c","d","e");
$myarray=array_merge($arr1,$arr2);
print_r($myarray);
$myarray=array_unique($myarray);
print_r($myarray);
?>
第3个回答 推荐于2016-10-29
<?php
$arr1=array("a","b","c");
$arr2=array("c","d","e");
$myarray=array_merge($arr1,$arr2);
print_r($myarray);
$myarray=array_unique($myarray);
print_r($myarray);
?>本回答被提问者采纳
$arr1=array("a","b","c");
$arr2=array("c","d","e");
$myarray=array_merge($arr1,$arr2);
print_r($myarray);
$myarray=array_unique($myarray);
print_r($myarray);
?>本回答被提问者采纳