Re: a general perl like pares of the query string...
| From: | Aaron Moore | Date: | Sat, 08 Sep 2001 16:39:26 +0000 |
| Subject: | Re: a general perl like pares of the query string... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66535@lists.php.net to get a copy of this message | ||
Well hers teh perl version of the the parser... how do i convert this to php
$tmp = $ENV{'QUERY_STRING'};
@pairs = split(/&/, $tmp);
foreach $item (@pairs) {
($key, $content) = split(/=/,$item,2);
$content =~ tr/+/ /;
$content =~ s/%(..)/pack("c",hex($1))/ge;
$fields{$key} = $content;
}