cabrooney Posted February 18, 2021 Share Posted February 18, 2021 I have a repeater field containing a list of pages (each page with people information like first_name, last_name etc.). When i try to sort and display with foreach(), the sorting puts all lowercase-starting entries at the back after Z... My Script: foreach ($group->group_people->sort("person_name") as $person){ echo $person->person_name; } Output: Alberts Bernard Constantin ... Zachary van Bergen The last Name "van Bergen" is lowercase and is put at the end of the sorting array. Is there a way to sort while ignoring upper/lowercase? Link to comment Share on other sites More sharing options...
horst Posted February 18, 2021 Share Posted February 18, 2021 maybe this can help you out: https://processwire.com/api/ref/wire-array/sort-flags/ (but haven't tested anything myself) 3 Link to comment Share on other sites More sharing options...
Robin S Posted February 18, 2021 Share Posted February 18, 2021 @horst is right. Here's a demo: 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now