natcasesort works on one server but not on another


Posted on 16th Feb 2014 07:03 pm by admin

Hi

I have a problem that I was hoping that someone can help me with.

Did you know?Explore Trending and Topic pages for more stories like this.
I'm trying to use natcasesort() to sort an array. This works fine on my laptop (which I use for testing and which uses php 5.2.6), but doesn't work at all on the server that hosts my website (it's just displayed unsorted; uses php 5.2.4). Both machines run apache.

I figure that as it works fine in one place, but not in the other, it is likely that the problem is in the difference between the configurations of these two php installations.

Please can you tell me if you have any idea of what could be causing this?

In case it helps shed some light, here's my code (in brief):

Code: [Select] $arr= array();
$arr = ListFilesInFolder( CLIENT_DIR . "/" . $folder . "/" );
$sorted = natcasesort($arr);

Thanks for your consideration.
No comments posted yet

Your Answer:

Login to answer
77 Like 51 Dislike
Previous forums Next forums
Other forums

Multipe Dynamic Controls & AutoPostback Issue
I currently have a need to create many dynamic controls (Example Textboxes) that need to do a PostBa

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

Can php detect connection speed and thereafter swap out elements?
No code to post, lads, yet. Just looking for a yay or nay at this stage:

Can a php script be

Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

output printing as hexadecmal... XD
Everything works except the calcem call for the totusold and totuprice. The out put shows up as hex.

Typing math
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]

Transport data between itab and textfield on ALV event
Hallo,

I have a ALV Grid ( cl_gui_alv_grid ) and I also have hotspot click event with a h

using file_get_contents??
okay how would i create a script using file_get_contents() in php have it grab search pages 1-20 and

Rand() help needed
Hi all,

Can someone explain and give me a quick example of how I would go about this?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash