Reputation: 67
I want to sort a php array in a way that it compares to a certain string and
I am getting the array remotely so i do not have any control over sql statements
I have googled and couldn't find a satisfying answer.
Thank you in advance
Upvotes: 2
Views: 1668
Reputation: 2759
You could use usort
with a callback function that utilizes levenshtein() to sort your array.
Upvotes: 5