echo into variable or the like

<[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <8A08B9783A7A42E089884CC143CC4222@L>
Hi, this is my first post so forgive me if I missed a rule and do something wrong.

I have this code,

echo $_SERVER['PHP_SELF']."?";
foreach ($_GET as $urlvar=>$urlval)
echo $urlvar."=".$urlval."&";

It works by it’s self. 
I want to insert the output in a table.  Is there a way to ‘echo’ into a variable(i.e. make the output of this echo the value of a variable) or am I on the wrong track all together?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.