Results 1 to 4 of 4
  1. #1

    php sort() strings

    right now i am using sort in some spots in my code, and it sorts everything so that capital letters are listed first so it migh look like this


    i tried using the different flags for sort(), but that didnt do anything. how can i make sort not case sensitive?

    workstations&servers @

  2. #2
    Join Date
    Jul 2005
    take a look at natsort() or natcasesort() depending on your needs.

  3. #3
    i think it is working, but it might just be doing it because of the way mysql is reporting back. it naturally is goin in z-a order, how can i switch the order to a-z order?

    thx for the help
    workstations&servers @

  4. #4

    If you want to change the way that mysql query sorts the data, add

    ORDER BY <field> ASC

    at the end of the mysql query.

    If you want to reverse the sorted array, use array_reverse() PHP function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts