The comments on your question link to answers that use preg_split() instead of explode() to provide more accurate description of how and when to split the input. That might work for you. Another approach would be to split your input on every occurrence of ". "
into a temporary array, then loop through that array, piecing it back together however you like. e.g.
$tempArray = explode('. ', $input);
$outputArray = array();
$outputElement = '';
$sentenceCount = 0;
foreach($tempArray as $part){
$outputElement .= $part . '. ';
//put other exceptions here, not just "Mr."
if ($part != 'Mr'){
$sentenceCount++;
}
if ($senteceCount == 2){
$outputArray[] = $outputElement;
$outputElement = '';
$sentenceCount = 0;
}
}