note 50682 deleted from function.htmlentities by nlopess
| From: | nlopess@php.net | Date: | Mon, 07 Mar 2005 15:07:34 +0000 |
| Subject: | note 50682 deleted from function.htmlentities by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-86043@lists.php.net to get a copy of this message | ||
Note Submitter: ninive at gmx dot at
Reason: useless
----
I use this function:
function formatvalue( $text )
{
$text = (string)$text;
$text = htmlentities($text, ENT_QUOTES);
$entities = array(/*"'" => "'",*/ "" =>
"€", "" => "‚", "" =>
"ƒ", "" => "„", "
" =>
"…", "" => "†", "" =>
"‡", "" => "ˆ", "" =>
"‰", "" => "Š", "" =>
"‹", "" => "Œ", "" =>
"‘", "" => "’", "" =>
"“", "" => "”", "" =>
"•", "" => "–", "" =>
"—", "" => "˜", "" =>
"™", "" => "š", "" =>
"›", "" => "œ", "" =>
"&Yuml");
foreach( $entities as $char => $entity )
$text = str_replace($char,$entity,$text);
return $text;
}