note 10606 deleted from function.strtr by jimw

From: Date: Fri, 14 Dec 2001 20:34:37 +0000
Subject: note 10606 deleted from function.strtr by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22758@lists.php.net to get a copy of this message
for translating html entities to text use this: $trans = array_flip(get_html_translation_table(HTML_ENTITIES)); $trans["&"] = "&"; $str = strtr($str,$trans); note that when you reverse the translation table with array_flip() some characters aren't translated correctly (like & for example). to check the translation table use: print_r($trans); bvr.

« previous php.notes (#22758) next »