Re: in_array() fails but it's in the array

From: Jan Pieter Kunst (devnull_at_cauce.org)
Date: 04/19/04


Date: Mon, 19 Apr 2004 18:17:06 +0200

In article <1cdca2a7.0404190718.11c223a7@posting.google.com>,
 soazine@erols.com (Phil Powell) wrote:

> [Quote]
> array_keys($boolword) = Array ( [0] => 'album' [1] => 'keywords' [2]
> => 'persons' [3] => 'events' [4] => 'image_alt' [5] =>
> 'image_creation_start_date' [6] => 'image_creation_end_date' [7] =>
> 'image_location_city' [8] => 'image_location_state' [9] =>
> 'image_location_country' )
> [/Quote]
>
> Here is my array. Plain and simple enumerative array with values
> being strings.
>
> So why does this fail???
>
> [PHP]
> print_r(in_array('album', array_keys($boolword)));
> [/PHP]
>

You probably mean something like this:

$boolword = array('album', 'keywords', ...);

var_dump(in_array('album', $boolword));
 
JP

-- 
Sorry, <devnull@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.