Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Jotade29 on January 17, 2024, 05:46:55 PM

Title: In boucle for orden alphabetic with Ñ
Post by: Jotade29 on January 17, 2024, 05:46:55 PM
My version: 2.0.19

Hi!!

I wud like to add to this alphabetical order the letter "ñ" which is a Spanish letter that is placed between "n" and "o". But ii can't think of how to do it. With the following code fragment it doesn't show me the "ñ"... Any ideas?

for ($i=ord("A");$i<=ord("Z");$i++)
    {
        if (!in_array(chr($i),$alfabeto_l) )
            $context['diccionario'] .= chr($i).' | ';
        else
            $context['diccionario'] .= '<b><a href="javascript:letra_diccionario(\''.chr($i).'\')">'.chr($i).'</a></b> | ';
    }

With this code, i see... A | B | C ... Z |, with or within link. I need see "(...) | N | Ñ | O | (...)".

tHXNXX!