Want to know the similarity percentage between two strings?. Php provides a in built function called similar_text();
Example code:
<?php $string1="HELLO"; $string2="WELCOME"; similar_text($string1, $string1, $percentage); echo $percentage; ?>
will display
50
as
result.
If the strings are equal then the percentage
is
100
.