note 51311 deleted from function.ereg-replace by betz

From: Date: Sun, 27 Mar 2005 09:28:36 +0000
Subject: note 51311 deleted from function.ereg-replace by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-87047@lists.php.net to get a copy of this message
Note Submitter: guto dot onidesk at gmail dot com ---- hello tere . I new on php thing, and i want to build a function to remove acentuation on characters. Don´t laught of this, but i try with the function above // Guto Ferreira " RemoveAcentuation function" function RemoveAcentuation($strSearch,$strAcent,$strWord) { global $strSearch,$strAcent,$strWord; $Acent = ereg_replace($ $strSearch,$strAcent,$strWord); switch($Letra){ case "Á","À","Â","Ã","Ä" : $Letra = "A"; // removing the acentuation break; ............ ............ default: $strAcent = ereg_replace("'","''",$strSearch); 1srt Question: Can i use this expression for default ??? } return $strAcent; // 2nd Question : It the return method OK ??? } I´m using this function on a script dictionary i´m building and i use it like this ....sql comands .... ".RemoveAcentuation(str_replace( "'", "''",$strSearch)).""; third question : the usage of the function on the script is correct or not??? Please help me, i need to use the function on the script . R:)gards Guto Ferreira PHP FrEElanceR [ http://onidesk.sytes.net] FOUNDER OF THE GROUP PHP-pt TO BEGGINERS AND EXPERTS knowed on site as:GRUPO PHP-pt PARA AMADORES E EXPERTS [http://www.hi5.com/ ]

« previous php.notes (#87047) next »