note 55366 deleted from function.str-replace by jacques
| From: | jacques@php.net | Date: | Mon, 01 Aug 2005 14:31:47 +0000 |
| Subject: | note 55366 deleted from function.str-replace by jacques | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92869@lists.php.net to get a copy of this message | ||
Note Submitter: jaray at alumnos dot inf dot utfsm dot cl
----
ESta funcion la hice para poder escribir articulos sin preocuparme de escribir acentos y las ñÑs
<?php
echo to_html("éstá és lá prúébá ñáÑdú");
function acentos($str){
$html_especial_chars =array(
chr(193) => "Á",
chr(201) => "É",
chr(205) => "Í",
chr(211) => "Ó",
chr(218) => "Ú",
chr(225) => "á",
chr(233) => "é",
chr(237) => "í",
chr(243) => "ó",
chr(250) => "ú",
chr(209) => "Ñ",
chr(241) => "ñ",
);
foreach($html_especial_chars as $key => $value)
$str=str_replace($key,$value,$str);
return $str;
}
?>