Re: in_array() fails but it's in the array
From: Paul Delannoy (delannoy_at_univ-lemans.fr)
Date: 04/19/04
- Next message: Jan Pieter Kunst: "Re: in_array() fails but it's in the array"
- Previous message: marathon: "Re: Test Format in PHP"
- In reply to: Phil Powell: "in_array() fails but it's in the array"
- Next in thread: Jan Pieter Kunst: "Re: in_array() fails but it's in the array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 19 Apr 2004 18:09:56 +0200
Phil Powell a écrit:
> [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]
What is $boolword ? it's inconsistent here, just place the name of the
array as second arg : print_r(in_array('album', array_keys));
- Next message: Jan Pieter Kunst: "Re: in_array() fails but it's in the array"
- Previous message: marathon: "Re: Test Format in PHP"
- In reply to: Phil Powell: "in_array() fails but it's in the array"
- Next in thread: Jan Pieter Kunst: "Re: in_array() fails but it's in the array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|