just to confirm, is this only happening on your bookings-event-printable.php ?
Yes.
To be clear: I have not even tried to sort the attendees in the booking table for a single event in the admin-area. (E.g. the url ‘edit.php?post_type=event&page=events-manager-bookings&event_id=nnn’. I don’t know the php-page).
The sorting on that page seems to be the time of order – at least not by the names.
And I do not need to sort that list but I really want to order the bookings-event-printable.php in a way that makes it simple for the box office!
-
This reply was modified 7 years, 10 months ago by joppedi.
Nope, caimin_nwl. I’ve already done that: “I have made… sort the list’s person name alphabetically”.
The result is as I wrote it places lower case letters AFTER capital letters.
-
This reply was modified 7 years, 10 months ago by joppedi.
You did’t mention that you’d used that code.
Try changing this line
asort($bookings);
to
natcasesort($bookings);
http://php.net/manual/en/function.natcasesort.php
Sorry caimin_nwl, you are absolutly wright! I missed to tell you I used that snippet to sort alphabetically.
I have also adjusted it to sort first ‘person_last_name’ and secondly ‘person_first_name’. Which work fine except for the lower case.
Now I have tried ‘natcasesort($bookings);’ but that totally disorder everything.
For exampel (Last_name, First name):
Chmi, Pa
asch, Jacob
Åsch, Hacon
Ösch, Åacob
bsch, Jacob
Sch, Jacob
asch, acob
This is not even the ID-order! Can’t figure out what sorting it does.
Remember I use charset “utf8mb4_swedish_ci” if it matters.
Perhaps solution is in the notes of that linked page of yours?
E.g.:
natcasesort($arr);
$arr = array_values($arr);
Can you post the version of the code you’re using?