Heim > Artikel > Backend-Entwicklung > php in_array用法一例
php in_array用法一例,供大家学习参考。
示例代码: <?php /** * php in_array简单示例 * site bbs.it-home.org */ $people = array("Peter", "Joe", "Glenn", "Cleveland"); if (in_array("Glenn",$people)) { echo "It's Here."; } else { echo "where you going?"; } ?> Output: It's Here. |