note 12018 added to function.array-search.php

From: Date: Mon, 19 Mar 2001 00:18:18 +0000
Subject: note 12018 added to function.array-search.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-12532@lists.php.net to get a copy of this message
If you want to be compatible with PHP3, i suggest using this function below: function findinarray($array,$searchvalue) { for ($i = 0; $i < count($array); $i++) { if (stristr($array[$i],$searchvalue)) return $i; } return 0; } Note: Doesn't work with associative arrays http://www.php.net/manual/en/function.array-search.php

« previous php.notes (#12532) next »