0

I have this problem with the Danish letters ÆØÅ. I use the following script to arrange posts alphabetically when loading the page.

if($stmt=$mysqli->prepare("select `titel` from `ann` order by `titel` asc ")) 
    {
    $stmt->execute();
    $stmt->bind_result($titel);
    while($stmt->fetch())
        {
        $letter=substr($titel,0,1);
        $res[$letter][] = array('titel' => $titel);
        } 
        foreach($res as $key=>$val)
        {
        ?>
        <div class="<?php $letter;?>"></div>
        <?php
        echo "<div class='group_letter'>$key</div>";
        foreach($val as $reqvals)
            {
            echo $reqvals['titel']; 
            }
        }
    $stmt->close();
    }  

Unfortunately, the script is unable to handle the 3 Danish letters, which are in the end of the alphabet. They are placed first - before "A" hen loading the page.


Åben dialog......

A Altid klar Astrids hemmelighed

B Bravo Klaus

D Den hemmelige klumme

How can I fix this?

riefart
  • 21
  • 2

0 Answers0