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

Remote Database Access
Hey guys!!

OK, i'm used to only working with databases from the CPANEL, accessing phpMyAdmin

PHP IMAGE UPLOAD SCRIPT
Hi for the last week i have been looking for scripts that will upload a photo to a certain folder wh

need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requiremen

Best way to cross matching large datasets
Hi,

Im running a script where am I cross matching about 200 000 data sets with each other. Ea

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

* Gridview and Detailsview in UpdatePanel, insert mode problem
I have a GridView and DetailsView working together. When a record from Gridview is selected, Detail

Count
Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FR

$_GET problem
Hi all,

Have a bit of a problem with a little piece of code, I am not sure if this should be

Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor

Get keys and values from an array
Hellow,

I have an array $Data with keys and values. With a foreach I can display all the valu

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