<?php $string1 = "Hello how are you doing"; $string2 = " hi, how are you"; $words1 = str_word_count($string1, 1); $words2 = str_word_count($string2, 1); var_export( count(array_intersect($words1, $words2)) / count($words1) * 100 );
You have javascript disabled. You will not be able to edit any code.