I want to sort a php array in a way that it compares to a certain string and
- Exact match of the string is in the top
- the rest need to be sorted according to relevance to the string. The most similar string to be next and so on.
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