There are two ways to deal with this. The first is to encode the URL correctly so that the '&' character is converted to '%26'. You can use the PHP
urlencode[
^] function, or in Javascript you can use
encodeURIComponent[
^]. PHP will automatically decode the '%26' back into '&' before placing it in
$_GET
.
The second way is to parse the whole of the query string yourself, which you might have to do if you have no control over the data passed to your script. You can find the contents of the query string in
$_SERVER['QUERY_STRING']
.