Okay.. so basically, say we have a link:
$url = \"http://www.site.com/index.php?sub=Mawson&state=QLD&cat=4&page=2&sort=z\";
$v) {
if ($v)
{
$tmp = explode('=', $v);
if (sizeof($tmp ) < 2) $tmp[1] = true;
$queries_array[$tmp[0]] = urldecode($tmp[1]);
}
}
}
$newQueries = array_merge($queries_array,$array);
return $cut_url[0].'?'.http_build_query($newQueries);
}
?>
Use like this :
'queryValue'));
?>
I do that this morning, it seems to work in all case. You can change / add more than one query, with the array ;)