Voting

: nine plus zero?
(Example: nine)

The Note You're Voting On

Will Voelcker
14 years ago
If you need a function that does something similar to parse_str, but doesn't convert spaces and dots to underscores, try something like the following:

<?php
function parseQueryString($str) {
$op = array();
$pairs = explode("&", $str);
foreach (
$pairs as $pair) {
list(
$k, $v) = array_map("urldecode", explode("=", $pair));
$op[$k] = $v;
}
return
$op;
}
?>

It may need adapting to handle various edge cases.

<< Back to user notes page

To Top