When I echo the contents of the $_GET variable, there are two values that weren’t even in the link.
array (
'__utma' => '118264987.369913698.1357785187.1358515273.1358367728.77',
'__utmz' => '118254987.1328042362.21.9.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not provided)',
)
How can I reliably strip the $_GET variable of all this useless data?
You can remove the “offending” array keys like this:
It removes (or rather skips) the keys that start with
__utmand are followed by exactly one character.Btw, you can change the pattern to be more restrictive, such as:
This will only remove
__utmaand__utmzbut not__utmxfor instance.