rendered paste bodyfunction summarize($text, $numSentences){print "This is inside the function summarize $text<br>"; $found = 0;$i = 0;$done = false;$minChars = 50;$maxChars = 500 * $numSentences;if($done == false){ for($i=1;$i<=$numSentences; $i++) { $found = strpos($text, "." , found + 1); echo "<br><b> Inside forloop $found</b></br>"; } if($found < minChars) { $numSentences = 1; } else { $done = true; } if(($found > maxChars) && ($numSentences > 1) ) { $numSentences = 1; $found = 0; $done = false; }}echo "<br><b> Outside forloop $found</b></br>";return $found;}