1

I am using codeigniter directory_map function like this

$pdf = directory_map('./pages/'.lang('page_lang').'/pdf/spisak/');
sort($pdf);
foreach($pdf as $singlepdf) {
    echo '<li>
          <a target="_blank" href="pages/'.lang('page_lang').'/pdf/spisak/'.$singlepdf.'">'.substr($singlepdf, 0, -7).'</a>
          </li>';
}

The problem is have, is that I am sorting that file array, only problem is with serbian letters, like eastern european (Ђ,Д,Ш,Н etc.) It does not sort them properly, it goes something like this

ЂУРИЧИЋ НЕБОЈША
АЂАНЋИЋ ДУШАН

But it should be like this

АЂАНЋИЋ ДУШАН
ЂУРИЧИЋ НЕБОЈША

Is there a way to properly sort eastern european array in codeigniter?

EDITED

I also in array have ALEKSANDAR, BUDIMIR, АЛЕКСАНДАР

After sorting i got something like this

ALEKSANDAR
BUDIMIR
АЛЕКСАНДАР

but i need somthing like this

ALEKSANDAR
АЛЕКСАНДАР
BUDIMIR
Miomir Dancevic
  • 6,726
  • 15
  • 74
  • 142

0 Answers0