函数in_array( ),第1个参数是数组,可以么?解决方案

WBOY
Release: 2016-06-13 12:35:09
Original
895 people have browsed it

函数in_array( ),第1个参数是数组,可以么?

<br />
<?<br />
    $x1=array(1=>111,2=>222,3=>333);<br />
    $x2=array(1=>777,2=>111,3=>222,4=>333)<br />
    $y=in_array($x1,$x2);           //第1个参数是数组。<br />
    echo $y;<br />
    echo "\r\n";<br />
?><br />
Copy after login



程序为什么出错?

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template