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.

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

limit string by words??
hello all,

I was wonder if there is a function to limit a string by the number of words inste

Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work

Which par

sendmail code suddenly not working
Hi Guys, I maintain 3 sites (including my own) I use the following code from a french webmaster that

onclick problem
I have <input type="text" name="message">
<a href=page2.

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

session checking in page load
hai all I have a web site is www.Mryas.com in this my login page is Page1.aspx its co

Help: problem with Headers to download PDF file
Hi,

I'm trying to implement a script where when a user clicks a link he gets a PDF file to op

Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other

Print 'a' to 'z' via for loop
A very simple problem..
How Can I print a to z NOT a to y ?
It is a part of a code where
<

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