Question on the list() function

From: Date: Mon, 10 Sep 2001 04:19:12 +0000
Subject: Question on the list() function
Groups: php.general 
Request: Send a blank email to php-general+get-66656@lists.php.net to get a copy of this message
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

« previous php.general (#66656) next »