I am now working on a system with globals off and stumbling ahead.
I have a form that allows up to 20 names, emails, etc to be added for a class roster system.
Each name is identified as studentName[$i], studentEmail[$i] etc
Values submitted via GET method:
$studentName[0] = Steve Veltkamp
$studentName[1] = Letty Veltkamp
$studentEmail[0] = bizshop@bizshop.com
$studentEmail[1] = letty@bizshop.com
(I'm not showing the empty 18 of each)
But the following doesn't work:
while($i<=20){
echo "$_REQUEST['studentName[$i]']";
}
I get:
parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
Those variables that are not serialized work fine, but I think the syntax for the [$i] must be wrong...