Re: how can I decode such a string ?

From: Date: Tue, 27 Jun 2006 16:42:16 +0000
Subject: Re: how can I decode such a string ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-238732@lists.php.net to get a copy of this message
nicolas figaro wrote:
Hi, I'd like to convert a string generated by a mail client like the following one : "test nf =?ISO-8859-15?Q?=E9_123456789012?=" back to the original one "test nf é 123456789012". Is there a (simple) way to do this ? thanks N F
I'm short of time, but, this should get you started preg_match("%_(\d+)\?=%", $str, $result); $output= 'test nf é ' . $result[1]; $result[1] gets all the digits between the underscore and the "?="

« previous php.general (#238732) next »