Hi,

Sunday, May 16, 2004, 1:47:44 AM, you wrote:
DC> i know it could be a stupid problem, but i need a help and i
DC> hope u could be generous with me :).
DC> this is my code, it writes the list of POST and GET variables. 

DC> <?
DC> echo "GET:<BR>";
DC> foreach($_GET as $parole)
DC> {
DC>  echo "Parola = $parole <br>";
DC> }

DC> echo "<br><br>POST:<BR>";
DC> foreach($_POST as $parole)
DC> {
DC>  echo "Parola = $parole <br>";
DC> }
?>>

DC> i want to write also the name of the variable, for example:
DC> if i call my page so --->  index.php?id=2&a=4
DC> it writes

DC>     GET:
DC>     Parola = 2 
DC>     Parola = 4 
    
    
DC>     POST:

DC> I want it to write:

DC>     GET:
DC>     id = 2 
DC>     a = 4 
    
    
DC>     POST:

DC> how can I do it?
DC> thx for any help.

You need the keys like this:

foreach($_GET as $key=>$parole)
{
 echo "$key = $parole <br>";
}

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to