what is the syntax of the SIMILAR_TEXT() function in php?
similar_text(string1,string2,percent)
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to be compared |
string2 | Required. Specifies the second string to be compared |
percent | Optional. Specifies a variable name for storing the similarity in percent |
examples of the SIMILAR_TEXT() function
Example 1. In this example, we calculate the similarity between two strings and return the matching characters.
<?php
echo similar_text("Hello World","Hello Peter");
?>