Hmm.. I dont think I agree with you on that. First the code works perfect,
second its just using two list() rather then one, otherwise its exactly the
same thing as you say would work, which is what makes me think its a two
dimensional array.

Ken


_lallous wrote in message <[EMAIL PROTECTED]>...
>I don't think this is correct!
>
>You can't do this:
>
>list($a, $b) = variable!
>which is the case in: list($key, list($tag, $data)) = each($array)
>
>you can use: list($key, $value) = each($array)
>
>
>"D" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> I am a newbie and having some problems with a function I found in a
>script:
>>
>> while(list($key,list($tag,$data))=each($array))
>>
>> From what I have read of list(), what I assume is happening here is that
>its
>> takeing a 2 dimensional array and assigning the key value pairs
>accordingly,
>> so that I can then work with the data using the $key, $tag, and $data
>> variables while it cycles through each item in the array. Is this
correct?
>>
>> If this is correct, which order is the dimension of the array? For
example
>> if the values of the variables were: $tag = 2 and $key = 1 would it be:
>> $array[1][2] or $array[2][1]
>>
>> I have tried both, and dont get the $data (outside of the while loop I am
>> trying to access specific parts of the array). Other thoughts?
>>
>> Thanks for the help,
>>
>> Ken
>>

>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to