Word starting with: " . $arraystart[$i] . " stoped the process.

\n"; $counter = $counter+1; } } } // Start End Of Word test (special case is when the end word ends with a dot (.)): $arrayend = array(); $buff = ""; $fp = fopen('_se_end.txt','r',TRUE); while (!feof($fp)) { $buff = trim(fgets($fp), 256); $buff = preg_replace($pattern, $replace, $buff); array_push($arrayend, $buff); } fclose($fp); $en = count($arrayend)-1; $matchend = array(); for ($i=0;$i<=$en;$i++) { foreach ($arraystr as $value) { $value = preg_replace('/\.$/', "", $value); preg_match('/..$/i', $value, $matchend); // do we have the $matches[0] value in the list of non valid ends of word? if (stristr($arrayend[$i], $matchend[0]) == TRUE) { // print "

Word ending with: " . $arraystart[$i] . " stoped the process.

\n"; $counter = $counter+1; } } } return $counter; } // One (1) error will be passed, at two (2) or more some other processing. if (test_expression($strcheckme) >= 2) { print("

Input NOT OK.

\n

$originalstr

\n"); } else { print("

Input OK.

\n

$originalstr

\n"); } ?>