Re: foreach on a 3d array
| From: | Ivo F.A.C. Fokkema | Date: | Wed, 25 Oct 2006 12:09:23 +0000 |
| Subject: | Re: foreach on a 3d array | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243613@lists.php.net to get a copy of this message | ||
On Wed, 25 Oct 2006 13:53:47 +0200, Dotan Cohen wrote:
> On 25/10/06, Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@lumc.nl> wrote:
>>
>> Because that wouldn't work :)
>>
>> This variable may contain stuff like "nl,en-us;q=0.7,en;q=0.3". You'll
>> need to do something with this variable first to use
>> array_key_exists (or as you do, isset). That said, I agree that
>> strstr() might not be the best solution.
>>
>> An other note, Dotan: shouldn't $_HTTP_ACCEPT_LANGUAGE actually be
>> $_SERVER['HTTP_ACCEPT_LANGUAGE']?
>>
>
> I am using $HTTP_ACCEPT_LANGUAGE. I copied-pested
> $_HTTP_ACCEPT_LANGUAGE from the first version of the code, which of
> course didn't work :) $_SERVER['HTTP_ACCEPT_LANGUAGE'] works too.
Ah, in that case using $HTTP_ACCEPT_LANGUAGE relies on the
register_globals setting, which is a security risk (and turned off by
default). Please read up on this, so you know what you're up against...
See: http://www.php.net/register_globals
Ivo