|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-18 12:17 UTC] bob at mroczka dot 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
> foreach($_REQUEST['list'] as $user) { > if (strlen($user")>$max) die("too long"); ^ ^^^ ^^^^^ I I I I Cheers, Rob.