-
Henry Wright replied to the topic Sorting by last name goes wrong when having multiple words as last name in the forum How-to & Troubleshooting 10 years ago
@nielspilon I really do think
substr( strstr( u.display_name, ' ' ), 1 )
is your answer. You say there’s definitely no members returned with that in place? -
Henry Wright replied to the topic Sorting by last name goes wrong when having multiple words as last name in the forum How-to & Troubleshooting 10 years ago
@shanebp Maybe just remove the first word from the string? i.e.
strstr( 'Robin van Persie', ' ' )
which gives
van Persie
. Then you just need remove the initial space:substr( ' van Persie', 1 )
@nielspilon if the sorting is fine (van, de etc) then that is down to luck 🙂
-
Henry Wright replied to the topic Sorting by last name goes wrong when having multiple words as last name in the forum How-to & Troubleshooting 10 years ago
@shanebp Maybe just remove the first word from the string? i.e.
strstr( 'Robin van Persie', ' ' )
which gives
van Persie
. Then you just need remove the initial space:ltrim( ' van Persie', ' ')
@nielspilon if the sorting is fine (van, de etc) then that is down to luck 🙂
@nielspilon
Active 1 year, 10 months ago