PHP similar_text Function
What is similar_text Function and how it is used in string?
In PHP this function is used to calculate the similarity between two strings.
In the above syntax "string1" specifies the first string to compare,"string2" specifies the second string to compare, "percentage" specifies a variable to store the similarity in percentage.
echo similar_text("Hello World","Hello Peter");
In the above similar_text function example two strings are compared to display the percentage of similar characters.