Home > Article > Backend Development > An example of php in_array usage
An example of how to use php in_array for your reference.
Sample code: <?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. |