union函数合并组数

来源:互联网 发布:emba 知乎 编辑:程序博客网 时间:2024/04/29 23:17

array_merge当然可以合并多条数组  但是SQL语句太过于繁杂  推荐用union 

看效果

<?php$a = array("a" => "PHP", "b" => "SQL");$b = array("a" => "AAA", "b" => "BBB", "c" => "CCC");$c = $a + $b; // Union of $a and $becho "Union of \$a and \$b: \n";var_dump($c);$c = $b + $a; // Union of $b and $aecho "Union of \$b and \$a: \n";var_dump($c);?> 


原创粉丝点击