Fw: [PHP] IMAP functions help
| From: | Danny Shepherd | Date: | Mon, 17 Jun 2002 13:12:46 +0000 |
| Subject: | Fw: [PHP] IMAP functions help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-102501@lists.php.net to get a copy of this message | ||
This should do it
<?php
function QPDecode($string)
{
return preg_replace_callback("/=(.{2})/", 'myCallback', $string);
}
function myCallback($match)
{
return chr(hexdec($match[1]));
}
$string ="The total price =3D =A3500";
echo QPDecode($string);
?>
----- Original Message -----
From: "Matthew Ward" <email@inspirationstudios.co.uk>
To: <php-general@lists.php.net>
Sent: Monday, June 17, 2002 1:53 PM
Subject: Re: [PHP] IMAP functions help
> So what function do I use to convert these ASCII codes back into their
> original characters?
>
> "Danny Shepherd" <danny@kyboshed.com> wrote in message
> news:00a101c215fd$78b1e9b0$6400a8c0@DANNYS...
>
> > Same thing as above =3D is ASCII for '='. 20 is ASCII for newline.
> >
> > HTH
> >
> > Danny.
> >
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>