note 15513 added to function.parse-str
| From: | tim at tmcode dot com | Date: | Fri, 14 Sep 2001 18:21:53 +0000 |
| Subject: | note 15513 added to function.parse-str | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18024@lists.php.net to get a copy of this message | ||
Spaces in field names are converted to underscores. This is done both when parsing into an array or
registering as variables. Ie:
$mystr="My+Field=abcd1234&My+Other+Field=sdfdsfds";
parse_str($mystr);
echo $My_Field;
Or
$mystr="My+Field=abcd1234&My+Other+Field=sdfdsfds";
parse_str($mystr,$myarray);
echo $myarray["My_Field"];
Hope this saves someone a couple minutes of prolonged pain.
http://www.php.net/manual/en/function.parse-str.php