Hi folks,
Does anybody have any idea to get the last two sentences from a paragraph?If it is the first 'n' then its not that difficult
for( $i=0,$w=0;$i<strlen($string);$i++ ) {
if( $string{$i} == '.' AND ++$w==4 ) break;
$output .= $string{$i};
}
$outlen=strlen($output);
$output1=substr($string,0,$outlen+1);
$output2=substr($string,$outlen+1,strlen($string));
but how to get the last 4???