I would like to sort the strings in PHP, and the match should be done primarily on the first letters of the substring, and then on the letters of the whole string.
For example, if someone searches for do and the list contains
Adolf Doe Done
the result should be
Doe Done Adolf
Using regular sort($array, SORT_STRING) , or similar things do not work, Adolf is sorted before others.
Does anyone have any ideas how to do this?
user1603166
source share