I am doing a very small online store application in PHP. So I have an array of maps in PHP. I want to search for a string (a product) in the array. I looked at array_search
foreach($array as $item){ if(strpos($item,"mysearchword")!== false){ echo 'found'; } }
or you can use preg_match for more flexible search instead of strpos.