PHP similar_text() Function

The similar_text() function is used to take counting number from replaced character.

Demo :



Type Text  Replace Char     
0

Example :

Type sentance at textarea like this php is a programming language and also type replace Char text box like this php.Then click count button finally you get output this 3


<?php
  $originalString = "php is a programming language";
  $replaceString = "php";
  $result = similar_text($originalString,$replaceString);
  echo $result;
?>

In the above code is used to the number of matching characters of two strings.In the similar_text() function have three parameters that name is string str1,string str2,[float percent].

Free Download Script :

If you need similar_text() function demo code download from following link.

Download




Content