Question: urldecode
| From: | Stuart Felenstein | Date: | Thu, 09 Dec 2004 11:51:54 +0000 |
| Subject: | Question: urldecode | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-203806@lists.php.net to get a copy of this message | ||
In my search page, the url returned comes back with
the ..err I forget what it's called, but query string
looks like this: %5B%5D=3. I think the %5B and 5D
should be [].
What I think is needed is rawurldecode. I've looked
through my code and think it belongs somewhere in this
block:
$queryString_rsVJ = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_rsVJ") == false &&
stristr($param, "totalRows_rsVJ") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_rsVJ = "&" .
htmlentities(implode("&", $newParams));
}
}
would doing something like this make sense?:
$queryString_rsVJ = "&" .
htmlentities(rawurldecode(implode("&", $newParams)));
Feedback appreciated.
Thank you
Stuart