I have to compare two words. The first word is "módulo" and the other one is "modulo". I've tried to replace the accent, then I realize the word never changed after call the method to replace the accent. I get the first word from two arrays. The first array from an unserialize array called tipo.
<?
$tipo = unserialize(TIPO);
$estado = unserialize(ESTADO); ?>
The second array comes from a database result, $prop['propiedad_tipo'] propiedad_tipo is int type.
$tipo_dato = (@$prop['propiedad_tipo'])?$tipo[ $prop['propiedad_tipo'] ]:'';
Through this value I can access to an index from "tipo" array, this is where i get the word "módulo".
And when I do this
if($tipo_dato == 'módulo')
$tipo_dato = 'modulo';
nothing happens :( please help.
Ps. sorry for my english :(
-- Maybe this helps
$tipo_dato = (@$prop['propiedad_tipo'])?strtolower($tipo[ $prop['propiedad_tipo'] ]):'';
echo serialize($tipo_dato); echo '<br>'.serialize('módulo');
The result is s:13:"módulo"; s:7:"módulo";
--
I've found the big error. When i serialized the array "TIPO" I used módulo
I chaged it to módulo and then everything works fine...
Thank you so much for your help