note 73635 added to function.ereg-replace

From: Date: Mon, 05 Mar 2007 13:16:30 +0000
Subject: note 73635 added to function.ereg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-124095@lists.php.net to get a copy of this message
//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); } ---- Server IP: 217.13.201.10 Probable Submitter: 84.56.47.155 ---- Manual Page -- http://www.php.net/manual/en/function.ereg-replace.php Edit -- https://master.php.net/note/edit/73635 Del: integrated -- https://master.php.net/note/delete/73635/integrated Del: useless -- https://master.php.net/note/delete/73635/useless Del: bad code -- https://master.php.net/note/delete/73635/bad+code Del: spam -- https://master.php.net/note/delete/73635/spam Del: non-english -- https://master.php.net/note/delete/73635/non-english Del: in docs -- https://master.php.net/note/delete/73635/in+docs Del: other reasons-- https://master.php.net/note/delete/73635 Reject -- https://master.php.net/note/reject/73635 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124095) next »