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

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Warning: Cannot modify header information - headers already sent by (output sta
Warning: Cannot modify header information - headers already sent by (output started at /home/praylif

Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

Email Processor
I have a few questions so this post will be a larger one! Sorry, but I'm a bit of a PHP newbie so be

Variable uses and placement
I'm new to PL/SQL and am trying to learn about variable valid uses/placement (any pointers to any do

Form errors in an array
I'm processing a form and putting the errors in an array. empty($errors) doesn't seem to do the tric

How to disable direct access to a file
Suppose I've 2 Files. 1.php & 2.php

I don't want anybody to access 2.php directly fr

PHP Mysql Staff Induction System
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi

keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde

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