I’m trying to compare two strings. Using similar_text
for these two strings:
$sim = similar_text(strtolower("Siena Cathedral"), strtolower("Siena Court"), $perc1);
$sim = similar_text(strtolower("Siena Cathedral"), strtolower("Cathedral of Siena"), $perc2);
Which results in:
61.538461538462%
54.545454545455%
Which to me is absolutely not correct. The second one should be the more similar result.
What changes can I make to this so that the second text is the more similar result?