Home  >  Article  >  php教程  >  php array_diff usage example

php array_diff usage example

大家讲道理
大家讲道理Original
2016-11-08 14:39:371431browse

<?php
 
$array1 = array(&#39;OH&#39;,&#39;CA&#39;,&#39;NY&#39;,&#39;HI&#39;,&#39;CT&#39;);
$array2 = array(&#39;OH&#39;,&#39;CA&#39;,&#39;HI&#39;,&#39;NY&#39;,&#39;IA&#39;);
$array3 = array(&#39;TX&#39;,&#39;MD&#39;,&#39;NE&#39;,&#39;OH&#39;,&#39;HI&#39;);
$diff = array_diff($array1, $array2, $array3);
print_r($intersection);
 
?>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php upload file codeNext article:php upload file code