ID:               16684
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Bogus
+Status:           Open
 Bug Type:         Arrays related
 Operating System: linux
 PHP Version:      4.2.0
 New Comment:

This is not a support question.  I know there many ways
to iterate over an array.  I just wanted to alert you to the fact
there is a problem with the foreach construct in its
handling of multi-dimensional arrays.


Previous Comments:
------------------------------------------------------------------------

[2002-04-18 12:37:30] [EMAIL PROTECTED]

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php



------------------------------------------------------------------------

[2002-04-18 12:17:59] [EMAIL PROTECTED]

i would like to iterate over the array named $_REQUEST['list'] like
this:

foreach($_REQUEST['list'] as $user) {
        if (strlen($user")>$max) die("too long");
}
error_log("gettype gives: ". gettype($_REQUEST['list']),0);

when php attempts to run this code I get this parse error in my apache
log:

PHP Parse error:  parse error, unexpected '\"' in
/var/www/htdocs/tmp.php on line 698

The message I write to the log about the type confirms that the
variable is an array.

I am currently using 4.2.0rc4

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16684&edit=1

Reply via email to