Re: Re: list() limitations

From: Date: Sat, 06 Apr 2002 07:16:38 +0000
Subject: Re: Re: list() limitations
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-82175@lists.php.net to get a copy of this message
> > $foo = array('a' => 'apple', 'b' => > > 'banana'); > > > > // Notice - Undefined offset: 1 > > // Notice - Undefined offset: 0 > > list($a,$b) = $foo; > > Isn't this line should be > > list($a, $b) = array_keys($foo); > or > list($a, $b) = array_values($foo); Sure that works. > I might miss you point, since it seems we are > going to make these feature requests bogus. Why? list() working with associative arrays seems bogus to you? Please be specific as to why this is bad. Why is requiring keys indices to begin at 0 good or necessary? I can't think of a case where this will be bad for a php user. Imho it's intuitive. Sure it's not a major deal and more pressing needs exist but hey, what can I say. :) Regards, Philip

« previous php.dev (#82175) next »