In ASP they have: for each item in request.form next
I wonder does PHP has something similar? 😃
foreach ($_REQUEST as $key => $val) { echo 'asp sucks'; }
I tried:
foreach ($_REQUEST as $key => $val) { echo $key & "-" & $val ; }
But it didn't give me the name and it's value
In ASP: For each item in request.form response.write item & "" & request.form(item) Next
Originally posted by linda_says But it didn't give me the name and it's value
Perhaps you are using an older version of PHP (before 4.1.0) $_REQUEST is one of the new global arrays! 😃
Try this:
foreach($HTTP_GET_VARS as $key => $value) {echo "$key => $value <br>";}
or this:
foreach($HTTP_POST_VARS as $key => $value) {echo "$key => $value <br>";}
depending on what method you are using
B