note 25016 added to function.substr-count
| From: | bpotter at statelinecasinos dot com | Date: | Sat, 07 Sep 2002 23:11:00 +0000 |
| Subject: | note 25016 added to function.substr-count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36315@lists.php.net to get a copy of this message | ||
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.
--
http://www.php.net/manual/en/function.substr-count.php
http://master.php.net/manage/user-notes.php?action=edit+25016
http://master.php.net/manage/user-notes.php?action=delete+25016
http://master.php.net/manage/user-notes.php?action=reject+25016