How can we Calculate the similarity between two strings

April 11, 2010 | Filed Under PHP | Comments Off

Using similar_text() get similarity between two strings.

Return Values

Returns the number of matching chars in both strings.

example

<?php

$first =’php3′;

$first  =’php4′;

echo  retail price similar_text ( $first, $second )  //3

?>

Comments

Comments are closed.

© PHPInterviewQuestion.com 2009 - 2012

eXTReMe Tracker