How to get HTTP request as an array of parametes=>values?
Thanx.
Bernie.
How to get HTTP request as an array?
Moderator: General Moderators
Request variables: $_REQUEST
Note: Introduced in 4.1.0. There is no equivalent array in earlier versions.
An associative array consisting of the contents of $_GET, $_POST, and $_COOKIE.
Note: Prior to PHP 4.3.0, $_FILES information was also included into $_REQUEST.
This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. You don't need to do a global $_REQUEST; to access it within functions or methods.
If the register_globals directive is set, then these variables will also be made available in the global scope of the script; i.e., separate from the $_REQUEST array. For related information, see the security chapter titled Using Register Globals. These individual globals are not autoglobals
Note: Introduced in 4.1.0. There is no equivalent array in earlier versions.
An associative array consisting of the contents of $_GET, $_POST, and $_COOKIE.
Note: Prior to PHP 4.3.0, $_FILES information was also included into $_REQUEST.
This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. You don't need to do a global $_REQUEST; to access it within functions or methods.
If the register_globals directive is set, then these variables will also be made available in the global scope of the script; i.e., separate from the $_REQUEST array. For related information, see the security chapter titled Using Register Globals. These individual globals are not autoglobals
Well, i've already read it from the help files, but the simple question is:
what code is needed to make a loop just to get every parameter id and each value?
Thanx.
Bernie.
what code is needed to make a loop just to get every parameter id and each value?
Thanx.
Bernie.
[]InTeR[] wrote:Request variables: $_REQUEST
Note: Introduced in 4.1.0. There is no equivalent array in earlier versions.
An associative array consisting of the contents of $_GET, $_POST, and $_COOKIE.
Note: Prior to PHP 4.3.0, $_FILES information was also included into $_REQUEST.
This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. You don't need to do a global $_REQUEST; to access it within functions or methods.
If the register_globals directive is set, then these variables will also be made available in the global scope of the script; i.e., separate from the $_REQUEST array. For related information, see the security chapter titled Using Register Globals. These individual globals are not autoglobals
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Could you explain a bit more what you are trying to achieve. Are you looking to use something like foreach()?
Mac
Code: Select all
foreach ($_REQUEST as $key => $value) {
echo '$key='.$key.' and value='.$value;
}This example is just what I needed to know.
Thank you.
Bernie.
Thank you.
Bernie.
twigletmac wrote:Could you explain a bit more what you are trying to achieve. Are you looking to use something like foreach()?MacCode: Select all
foreach ($_REQUEST as $key => $value) { echo '$key='.$key.' and value='.$value; }