Jump to content

Recommended Posts

i dont understand this function. why doesnt it display the days in their numerical order? any help greatly appreciated , thanks. derek

 

natsort($arrayname)

 

Sorts mixed string/number values in natural order.

For example, given an array with values day1, day5,

day11, day2, it sorts into the following order: day1,

day2, day5, day11. The previous sort functions sort

the array into this order: day1, day11, day2, day5.

No, its correct

read samshel post

 

"The previous sort functions sort" refers to sort()

 

 

normal sort will return

day1

day11

day2

day5

 

natsort should return them as

 

day1

day2

day5

day11

 

(which i think is happening as you mentioned). so what exactly is the problem?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.