<?php $str = "string with dot. And another. Again."; $n = 35; // in your case 100 $pos = strrpos(substr($str,0,$n), "."); If($pos === false) $pos = strlen($str); Echo substr($str,0, $pos+1);
You have javascript disabled. You will not be able to edit any code.