Seeing the ghost, $ _ request question. & lt ;? Php $ counter & nbsp; 0; $ temp & nbsp; 0; while (! Is_null & nbsp; ($ _ REQUEST [& #39; thisAnswer_id & #39 ;. & nbsp; ++ $ counter]) {++ $ temp; echo has a problem with $ _ request.
$ Counter = 0;
$ Temp = 0;
While (! Is_null ($ _ REQUEST ['thisanswer _ id'. ++ $ counter]);
{
+ + $ Temp;
Echo "~~ Temp is ". $ temp ."~~ ";
Echo "~~ Counter is ". $ counter ."~~ ";
$ ThisAnswer_id = array ($ counter = >$ _ REQUEST ['thisanswer _ id'. $ counter]);
?>
The output result is:
~~~ Temp is 1 ~~~
~~~ Counter is 3 ~~~
In addition, if the loop is executed only once, several values will be passed in before.
The purpose of this operation is to receive and store the same values of many attributes transmitted from the previous page in a circular manner into an array.
Please show me what is going on. thank you.
------ Solution --------------------
While (! Is_null ($ _ REQUEST ['thisanswer _ id'. ++ $ counter]);
Remove the ";" sign after this line ....
There will be another number.