Problem with each()

From: Date: Fri, 06 Apr 2001 03:40:22 +0000
Subject: Problem with each()
Groups: php.general 
Request: Send a blank email to php-general+get-47390@lists.php.net to get a copy of this message
I recall reading this somewhere in the past, but can't find the answer after looking for a couple of hours. I am getting this warning: Warning: Variable passed to each() is not an array or object in myfile.inc on line 1 Here's what I'm doing: While doing: $each_array = each($HTTP_POST_VARS) print("key: $each_array[0] value: $each_array[1]"); When I get to an array within HTTP_POST_VARS, it prints: key: var_name value: Array ok, but when I try to do an each on that array: (and maybe this is where I am wrong) $each_array2 = each($each_array[0]) I get the error that what I'm passing to the each is not an array. Can someone help me or point me to the right place? Thanks, David Minor

« previous php.general (#47390) next »