Ignore my solution ‹ hasty and wrong.

On 7/2/07 3:07 PM, "Cliff Hirsch" <[EMAIL PROTECTED]> wrote:

> in_array($value, $options, true) solves issues with type conversion (like
> Œfoobar¹ == (int)0)
> 
> But what about the equivalent for a key search?
> 
> array_key_exists ( mixed key, array search ) performs automatic type
> conversion ‹ evil.
> 
> I came up with:  count(array_keys($options, $value, true)) === 0
> 
> Any other ideas?
> 
> Cliff

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to