note 73635 deleted from function.ereg-replace by nlopess

From: 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('&quot;', '&amp;','&lt;','&gt;','&euro;', '&nbsp;','&Aacute;','&aacute;', '&Acirc;','&acirc;','&acute;', '&auml;','&Auml;','&ouml;', '&Ouml;','&uuml;','&Uuml;', '&egrave;','&Egrave;', '&Icirc;','&icirc;','&szlig;'); $def = Array('"','&','<','>', '€',' ','À','à','Â','â','´','ä','Ä', 'ö','Ö','ü','Ü','è','È','Î','î','ß'); for($i = 0;$i < count($def); $i++) { $texte = ereg_replace($def[$i], $charact[$i], $texte); } return($texte); }

« previous php.notes (#124101) next »