help can please some1 help me?

From: Date: Thu, 01 Mar 2001 19:59:06 +0000
Subject: help can please some1 help me?
Groups: php.db 
Request: Send a blank email to php-db+get-7042@lists.php.net to get a copy of this message
Hello all, i am making a php scrip that needs to convert special caracters html code and i've done a function to do that the prob is that this only work to the é or ê caracteres and not the all the other special caracaters like á ç for instance... can some1 see the code below and try do help me with this? here's what i have done: $word = $HTTP_GET_VARS["word"]; regexp($word); function regexp ($palavra) { $car[0] = 'ç'; $car[1] = 'á'; $car[2] = 'à'; $car[3] = 'ã'; $car[4] = 'â'; $car[5] = 'ó'; $car[6] = 'õ'; $car[7] = 'ô'; $car[8] = 'í'; $car[9] = 'ú'; $car[10] = 'é'; $car[11] = 'ê'; $code[0] = '&ccedil;'; $code[1] = '&aacute;'; $code[2] = '&agrave;'; $code[3] = '&atilde;'; $code[4] = '&acirc;'; $code[5] = '&oacute;'; $code[6] = '&otilde;'; $code[7] = '&ocirc;'; $code[8] = '&iacute;'; $code[9] = '&uacute;'; $code[10] = '&eacute;'; $code[11] = '&ecirc;'; $palavra = strtolower ($palavra); for ( $i = 0 ; $i <= 11 ; $i++ ) { $coded = eregi_replace ( $car[$i] , $code[$i] , $palavra ); } echo "Coded:"; echo $coded ; echo "<br>"; echo "Palavra:"; echo $palavra; echo "<br>"; } ?> Procura: <FORM ACTION="" METHOD="get"> <INPUT TYPE= "text" NAME = "word"><br> <INPUT TYPE=submit Value = "Procurar"> </form> ******************************************* Pedro Miguel Silva Oliveira Cell Phone: +351 96 5867227 SMS: 965867227@mail.tmn.pt Email: Oliveira.Pedro@bigfoot.com

« previous php.db (#7042) next »