http://www.php.net/manual/en/control-structures.foreach.php
Try this.
echo "GET:<BR>";
foreach($_GET as $key => $value)
{
echo "$key = $value <br>";
}
>>i know it could be a stupid problem, but i need a help and i hope u could be
>>generous with me :).
>>this is my code, it writes the list of POST and GET variables.
>>
>><?
>>echo "GET:<BR>";
>>foreach($_GET as $parole)
>>{
>> echo "Parola = $parole <br>";
>>}
>>
>>echo "<br><br>POST:<BR>";
>>foreach($_POST as $parole)
>>{
>> echo "Parola = $parole <br>";
>>}
>>?>
>>
>>i want to write also the name of the variable, for example:
>>if i call my page so ---> index.php?id=2&a=4
>>it writes
>>
>> GET:
>> Parola = 2
>> Parola = 4
>>
>>
>> POST:
>>
>>I want it to write:
>>
>> GET:
>> id = 2
>> a = 4
>>
>>
>> POST:
>>
>>how can I do it?
>>thx for any help.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php