include("config.php"); foreach ($_GET as $key => $value) { $site .= $key."=".$value."&"; } $site = substr($site, 4, -1); // returns "http://www.cj-design.com" without &out and all variables intact ?>