I want to add GET parameters to URLs that may and may not contain GET parameters without repeating ? or &.
?
&
Example:
If I want t
public function addGetParamToUrl($url, $params) { foreach ($params as $param) { if (strpos($url, "?")) { $url .= "&" .http_build_query($param); } else { $url .= "?" .http_build_query($param); } } return $url; }