Re: %xx conversions for forms

From: Date: Mon, 08 Oct 2001 23:00:13 +0000
Subject: Re: %xx conversions for forms
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-70394@lists.php.net to get a copy of this message
They don't have to be encoded query strings. the %xx is just a way of writing the characters (hex). rawurldecode just converts the hex, so long as it is in the %xx format. This should work: $string = "this is a string"; $array = array_str($string); foreach($array as $char){ $newstr .= "%".bin2hex($char); }; echo "$newstr\n"; echo rawurldecode($newstr); function array_str($string) { $var=explode("\r\n",chunk_split($string,1)); unset($var[sizeof($var)-1]); return $var; }; On Monday 08 October 2001 10:40 am, you wrote: > rawurldecode() if you mean encoded query strings. > Jeff Oien > > > Does anyone know the code to convert any "%xx" characters back to their > > respected character through PHP? I tried the way I learned through perl > > and it doesn't seem to work. > > > > Thanks! > > Dominik > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#70394) next »