infodigger
asked on
smiliar_text() function in PHP
I have a question regarding similar_text() function in php.
Is there a way so that if there are two strings with the same words but in different order to return 100%?
For example:
Thanks a lot!
John
Is there a way so that if there are two strings with the same words but in different order to return 100%?
For example:
similar_text("George Michael", "Michael George", $percent1); //Returns 50
similar_text("George Michael", "George Michael", $percent2); //Returns 100
Thanks a lot!
John
Sure. Make an array from the words and sort the array.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Ray!
As always a very complete and useful answer:)
Kind regards,
John
As always a very complete and useful answer:)
Kind regards,
John
Thanks, John. Glad to help!