Re: in_array() fails but it's in the array
From: Rasmus (razor-report_at_daimi.au.dk)
Date: 04/19/04
- Next message: marathon: "Re: Test Format in PHP"
- Previous message: Rasmus: "Re: My Website"
- In reply to: Phil Powell: "in_array() fails but it's in the array"
- Next in thread: Paul Delannoy: "Re: in_array() fails but it's in the array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 19 Apr 2004 17:37:58 +0200
have you tried with the proper syntax?
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' );
R
--
Due to VERY heavy spam reception (24,000+/week), I use a fake address.
Please write me in this newsgroup if you want to get in contact with me
NEVER support spammers or companies sending out spam
NEVER use links sent to you in a spam mail
NEVER unsubscribe a spam message
NEVER reply to spam
"Phil Powell" <soazine@erols.com> wrote in message
news:1cdca2a7.0404190718.11c223a7@posting.google.com...
> [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]
>
> This produces FALSE or NULL. But it's right there IN the array!! What
> on earth is going on? Is this a failure in the part of in_array() that
> I am unaware of?
>
> This is a major showstopper in my search code PHP script I'm writing
> for my application, please help someone!
>
> Thanx
> Phil
- Next message: marathon: "Re: Test Format in PHP"
- Previous message: Rasmus: "Re: My Website"
- In reply to: Phil Powell: "in_array() fails but it's in the array"
- Next in thread: Paul Delannoy: "Re: in_array() fails but it's in the array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|