note 73635 deleted from function.ereg-replace by nlopess
| From: | nlopess@php.net | Date: | Mon, 05 Mar 2007 16:34:35 +0000 |
| Subject: | note 73635 deleted from function.ereg-replace by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-124101@lists.php.net to get a copy of this message | ||
Note Submitter: xamurai at hotmail dot de
----
//this function replace extra
//character:
// usefull for html text
function parseExtraCharact($texte)
{
$charact = Array('"',
'&','<','>','€',
' ','Á','á',
'Â','â','´',
'ä','Ä','ö',
'Ö','ü','Ü',
'è','È',
'Î','î','ß');
$def = Array('"','&','<','>',
'â¬','
','Ã','à ','Ã','â','´','ä','Ã',
'ö','Ã','ü','Ã','è','Ã','Ã','î','Ã');
for($i = 0;$i < count($def);
$i++)
{
$texte = ereg_replace($def[$i],
$charact[$i], $texte);
}
return($texte);
}