Re: [PATCH] New parameter for in_array() & array_search()
| From: | Hannes Magnusson | Date: | Thu, 16 Aug 2007 12:22:16 +0000 |
| Subject: | Re: [PATCH] New parameter for in_array() & array_search() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-31624@lists.php.net to get a copy of this message | ||
On 8/15/07, Hannes Magnusson <hannes.magnusson@gmail.com> wrote:
> Hi all
>
> Attached* is a patch introducing a new parameter to in_array() and
> array_search() which will set the internal pointer to the first
> location of $needle in the $haystack (granted that $needle exists
> within the $haystack).
Or should we maybe create two new functions?
bool array_seek_value(&$array, mixed $value [, bool $strict=false]);
bool array_seek_key(&$array, integer/string $key);
-Hannes