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
No comments posted yet

Your Answer:

Login to answer
329 Like 33 Dislike
Previous forums Next forums
Other forums

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

Any meaningful project for a new C++ programmer?
I want to do some meaningful program, so I can help myself to learn

Assume I know the fol

Effort Estimation Template for Steady State Support
Hi Everyone,

Is there any SAP provided template/format for system change and enhancements

Email Script does not reach destination
Hey Guys look at this code snippet :
Code:
//read a line from the file

$myFile = "

Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty

Grabbing Values From an Array for Posting
I have a grid array that I am using with a form that when it hits the currently named test.php it lo

values in array being escaped
I would like to submit some values - back to the same form for checking before processing...

how to get IP address?
hey guys,

i have this code which is supposed to get me the IP address of my site visitors:

confused between ' ' and " "
there is a php i set:
$begin_date_query = mysql_query( "SELECT SUBDATE(due_date, INTERVAL $d

Keeping track of php uploads
Hello all.

I was looking at the way PHP handles file uploads.
It seems that PHP uses a tem

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