Is it any function in PHP that check the % of similarity of two strings?
For example i have:
$string1=\"Hello how are you doing\"
$string2= \" hi,
As other answers have already said, you can use similar_text. Here's the demonstration:
$string1="Hello how are you doing" ;
$string2= " hi, how are you";
echo similar_text($string1, $string2, $perc); //12
echo $perc; //61.538461538462
will return 12, and will set in $perc the percentage of similarity as you asked for.