Home > php教程 > PHP源码 > body text

php array_diff usage example

大家讲道理
Release: 2016-11-08 14:39:37
Original
1373 people have browsed it

<?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);
 
?>
Copy after login


source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!