PHP uses the Array_search function to implement the array lookup method, Array_search array
The example in this paper describes how PHP uses the Array_search function to implement array lookups. Share to everyone for your reference. The implementation method is as follows:
<?php$array = Array (4,5,7,8,9,10); $found = Array_search (8, $array);//Call the Array_search function and output the find result if ($found)//If the output key is found echo "found, key is". $found; else/ If no output error message is found echo "not found";?>
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/1015426.html www.bkjia.com true http://www.bkjia.com/PHPjc/1015426.html techarticle PHP uses the Array_search function to implement an array lookup method, Array_search array This article describes the PHP use Array_search function to implement array lookup method. Share to everyone for your reference ...