Bug #16684 Updated: parse error on foreach given array as $_REQUEST['list']
| From: | sander@php.net | Date: | Thu, 18 Apr 2002 16:37:32 +0000 |
| Subject: | Bug #16684 Updated: parse error on foreach given array as $_REQUEST['list'] | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-5317@lists.php.net to get a copy of this message | ||
ID: 16684
Updated by: sander@php.net
Reported By: bob@mroczka.com
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: linux
PHP Version: 4.2.0
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2002-04-18 12:17:59] bob@mroczka.com
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