Home >Backend Development >PHP Tutorial > 函数in_array( ),第1个参数是数组,可以么?解决方案

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

WBOY
WBOYOriginal
2016-06-13 12:35:09907browse

函数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 />



程序为什么出错?

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