note 25016 deleted from function.substr-count by nlopess
| From: | nlopess@php.net | Date: | Thu, 23 Jun 2005 19:58:26 +0000 |
| Subject: | note 25016 deleted from function.substr-count by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90854@lists.php.net to get a copy of this message | ||
Note Submitter: bpotter at statelinecasinos dot com
----
This is useful for pages that depend on the QUERY_STRING for values. Some search Engines (AOL) use
& in the link, which can cause problems and/or wrong information to be displayed.
if (substr_count($QUERY_STRING, "amp;") > 0) {
$QUERY_STRING = str_replace("amp;", "", $QUERY_STRING);
$queryArray = explode("&",$QUERY_STRING);
foreach ($queryArray as $queryItem) {
$querySegment = explode("=",$queryItem);
list ($key, $val) = $querySegment ;
if ($val)
$$key = $val;
}
}
Hope this helps.