in_array() fails but it's in the array
From: Phil Powell (soazine_at_erols.com)
Date: 04/19/04
- Next message: Rasmus: "Re: My Website"
- Previous message: xavier: "Re: PHP on a home PC?"
- Next in thread: Rasmus: "Re: in_array() fails but it's in the array"
- Reply: Rasmus: "Re: in_array() fails but it's in the array"
- Reply: Paul Delannoy: "Re: in_array() fails but it's in the array"
- Reply: Jan Pieter Kunst: "Re: in_array() fails but it's in the array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Apr 2004 08:18:24 -0700
[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: Rasmus: "Re: My Website"
- Previous message: xavier: "Re: PHP on a home PC?"
- Next in thread: Rasmus: "Re: in_array() fails but it's in the array"
- Reply: Rasmus: "Re: in_array() fails but it's in the array"
- Reply: Paul Delannoy: "Re: in_array() fails but it's in the array"
- Reply: Jan Pieter Kunst: "Re: in_array() fails but it's in the array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|