'/.+(\\?'.$var.')=(.*)$/AU', /* at front and only var */
'/.+(\\&'.$var.')=(.*)$/AU' /* at the end */
);
- preg_replace('/&/','&',$url);
+ $url = preg_replace('/&/','&',$url);
// FIXME: why switch is used instead of if () or one preg_match()
switch (true) {
$pat = "/$k=$v/";
$url = preg_replace($pat,$rpl,$url);
}
+ $url = preg_replace('/&/','&',$url);
return $url;
}
-?>
\ No newline at end of file