Question about array_search

From: Date: Mon, 11 Oct 2004 16:07:13 +0000
Subject: Question about array_search
Groups: php.general 
Request: Send a blank email to php-general+get-199193@lists.php.net to get a copy of this message
Say I'm trying to add a value to an array, only if it's not already in there somewhere; so I do an array_search to see. The problem is that if the item is at index 0 in the array, array_search gives the same answer as if it's not in there at all. How does one circumvent this potential pitfall? TIA, - Brian

« previous php.general (#199193) next »