954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

string comparsion

hi to every one i want to built a programe in php in which when two string is provided by user then these strings are compared and it shows the similarity between them in % form as i result.is there some one to help me?:(

just asif
Newbie Poster
7 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

Try this:

<?
$stringa='This is a test';
$stringb='This is a tests';
similar_text ($stringa,$stringb,$percent);
echo round($percent,2).'%';
?>


Hope that helps.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You