note 29619 added to function.parse-str
| From: | joe at no_spam_thx dot misuseit dot com | Date: | Wed, 19 Feb 2003 13:46:55 +0000 |
| Subject: | note 29619 added to function.parse-str | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44198@lists.php.net to get a copy of this message | ||
If you want to do much more manipulation of a query string you should probably first turn it into an
array with parse_str().
Also, if you're working with xhtml and you want it to validate you must use & to
separate any name-value pairs. This example takes a either a vaild or invalid xhtml query string and
turns it into an array...
$example_string = 'action=kick&item=me'
$example_string = str_replace('&', '&', $example_string);
parse_str($example_string, $query_array);
print_r($query_array);
// Outputs
Array
(
[action] => kick
[item] => me
)
--
http://www.php.net/manual/en/function.parse-str.php
http://master.php.net/manage/user-notes.php?action=edit+29619
http://master.php.net/manage/user-notes.php?action=delete+29619
http://master.php.net/manage/user-notes.php?action=reject+29619