数组相加合并

$a=array('uid'=>1,'zhang'=>2,'li'=>3);
$b=array('uid'=>1,'wang'=>12,'liu'=>13);
$c =$a+$b;
var_dump($a+$b);
array(5) {
 ["uid"]=>
 int(1)
 ["zhang"]=>
 int(2)
 ["li"]=>
 int(3)
 ["wang"]=>
 int(12)
 ["liu"]=>
 int(13)
}

 

No comments, so go and ...add one

Speak Your Mind

Your email address will not be published. Required fiels are marked *
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>