php数组合并&去重&恢复索引demo

<?php 
	$tmp = array('a','b','v');
	$tmp_1 = array('a','s','asdf');
	$res = array_merge($tmp,$tmp_1);
	$res = array_unique($res);
	$res = array_values($res);
	print_r($res);
?>

  

posted on 2016-09-23 10:36  多多明明  阅读(288)  评论(0编辑  收藏  举报