AgerNic.com
Start write and run your php code online
HOME Editor | PHP Exemples | PHP Functions |
WEB TEMPLATES | EXAMPLES
PHP Tutorial
PHP similar_text() function, run and write PHP code.

PHP similar_text() function - online editor.

similar_text — Calculate the similarity between two strings

Syntax:
similar_text(string1,string2,percent);
will calculate the similarity in percent, by dividing the result of similar_text() by the average of the lengths of the given strings times 100..

Example 1 Example uses of similar_text() function:

 <?php
$e_sim = similar_text('Online America today', 'Online America', $perc);
echo "similarity: $e_sim ($perc %)\n";
echo "<br />";
$e_sim = similar_text('Online America', 'Online America today 25th', $perc);
echo "similarity: $e_sim ($perc %)\n";
echo "<br /><br />"; similar_text("Online America","Online Europe",$percent);
echo $percent;
?>


Tags:
PHP similar_text() function 30

PHP similar_text() function

PHP Functons
PHP count() Function

PHP define() function

PHP empty() Function

PHP explode() function

PHP html_entity_decode() function

PHP htmlentities() function

PHP htmlspecialchars_decode() function

PHP htmlspecialchars() function

PHP implode() function

PHP isset() Function

PHP lcfirst() function

PHP ltrim() function

PHP md5() function

PHP print() function

PHP printf() function

PHP rtrim() function

PHP similar_text() function

PHP str_repeat() function

PHP str_replace() function

PHP str_split() function

PHP strcmp() function

PHP strip_tags() function

PHP strlen online function

PHP strrchr() Function

PHP strstr() function

PHP strtolower() function

PHP strtoupper() function

PHP substr() function

PHP trim() function

PHP ucfirst() function