I found the following function at the PHP Manual web site. It works great. It grabs the $_GET variables from the current page and prints it out. in the format of ?variable1=value&variable2=value
But I need to modify it to NOT include some variables. For instance, I have a variable called 'message' that I do not want this function to print. I also have a variable called 'action' that I'd like to change to a different name when printed.
Anyone have any ideas? I've messed around with it a bunch, but only end up making it way more complicated.
$variables = httpimplode(@$_GET);
function httpimplode($aryInput, $quma = true) {
if (is_array($aryInput) && count($aryInput)>0) {
if ($quma == true) {
$result = '?';
} else {
$result = '';
}
foreach ($aryInput as $key=>$value) {
if (strlen($result)>1) {
$result .= '&';
}
$result .= urlencode($key) . '=' . urlencode($value);
}
} else {
$result = '';
}
return $result;
}