Hashes don't have any notion of order so I don't quite understand what
you'd expect to see in $a and what in $b. Well actually I know what you
expect but it doesn't fit in with hashes.
It's not a bug but just the way list() works.
Andi
At 06:29 06/04/2002 +, Philip Olson wrote:
Hello, the
Hello, the following behavior seems odd:
$foo = array('a' = 'apple', 'b' = 'banana');
// Notice - Undefined offset: 1
// Notice - Undefined offset: 0
list($a,$b) = $foo;
// This of course works as expected
while(list(,$ab) = each($foo)) {
print $ab;
}
I recently