$value) { $site .= $key."=".$value."&"; } $site = substr($site, 4, -1); // returns "http://www.HKNepal.com" without &out and all variables intact ?> <? echo $website; ?> HKNepal.com