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
1
  • Ok, but this is custom, is there some codeigniter function for this? Commented Jun 27, 2015 at 13:50

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.