Re: Re: a general perl like pares of the query string...

From: Date: Sat, 08 Sep 2001 16:43:48 +0000
Subject: Re: Re: a general perl like pares of the query string...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66536@lists.php.net to get a copy of this message
http://php.net/parse_str On Sat, 8 Sep 2001, Aaron Moore wrote: > 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; > } > > > >

« previous php.general (#66536) next »