Re: Is there an opposite to htmlentities()? AGAIN

From: Date: Sat, 21 Oct 2000 23:57:20 +0000
Subject: Re: Is there an opposite to htmlentities()? AGAIN
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21606@lists.php.net to get a copy of this message
On Sun, 22 Oct 2000, Grant Walters wrote: > As the question states. > > Is there an opposite to htmlentities()? > > I understand that this function changes "<" to "&lt;" etc... > > How do I return them to their normal text equivalents? From the Annotated PHP Manual comments for the htmlentites function (Always a good place to check before posting a question to the list) ============== To backwards, $trans = get_html_transition_table(HTMLENTITIES); $trans = array_flip ($trans); $original = strtr ($str, $trans); Where $str is the string that had the HTMLENTITIES encoded text in it. It will now be back to normal text... Mike ============== Haven't tried it myself, but there it is. Matt

« previous php.general (#21606) next »