On Sat, 2002-04-06 at 11:45, Philip Olson wrote:
> > > Aside from saying it works on values for numerical arrays
> > > I can't say much else. That is intuitive and consistant
> > > to me, not ambiguous.
> >
> > It is :) Since we both already have different views. I
> > suggest leavin
On Sat, Apr 06, 2002 at 09:45:08AM +, Philip Olson wrote :
> > > Aside from saying it works on values for numerical arrays
> > > I can't say much else. That is intuitive and consistant
> > > to me, not ambiguous.
> >
> > It is :) Since we both already have different views. I
> >
> > Aside from saying it works on values for numerical arrays
> > I can't say much else. That is intuitive and consistant
> > to me, not ambiguous.
>
> It is :) Since we both already have different views. I
> suggest leaving it; it's not worth the trouble and using the
> array_(k
On Sat, Apr 06, 2002 at 09:35:25AM +, Philip Olson wrote :
> > The big question is: how would You (Philip,Yasuo) want list
> > to behave when it encounters a hash? Do you want to get the
> > keys ? Or the values? Or do you want to get the hashed
> > element on its own again as
> The big question is: how would You (Philip,Yasuo) want list
> to behave when it encounters a hash? Do you want to get the
> keys ? Or the values? Or do you want to get the hashed
> element on its own again as key => value ?
My opinion is:
$foo = array('a' => 'apple', 'b' => 'b
The big question is: how would You (Philip,Yasuo) want list
to behave when it encounters a hash? Do you want to get the
keys ? Or the values? Or do you want to get the hashed
element on its own again as key => value ?
No, I don't think it's a good idea. That is why we have
Philip Olson wrote:
>>> $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);
>
>
>
> > $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
Philip Olson wrote:
> Hello, the following behavior seems odd:
>
> $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)