On Mon, Jun 8, 2009 at 17:33, Dee Ayy wrote:
> array_search
> in the See Also section for in_array docs?
You and Andrew are quick today.
--
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Co
array_search
in the See Also section for in_array docs?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, Jun 8, 2009 at 5:29 PM, tedd wrote:
> Hi gang:
>
> Does anyone have a slick way to determine what the key would be for a
> successful find in in_array()?
>
> Such as:
>
> if (in_array($var, $array))
> {
> // what's they key for *this* successful find?
> }
>
> I know I could use:
>
> f
Hi gang:
Does anyone have a slick way to determine what the key would be for a
successful find in in_array()?
Such as:
if (in_array($var, $array))
{
// what's they key for *this* successful find?
}
I know I could use:
foreach($array as $key => $value)
{
if ($value == $var)
4 matches
Mail list logo