I found a way to get three sentences
<?php
$content = "My name is Luka. I live on the second floor. I live upstairs from you. Yes I think you've seen me before. ";
$dot = ".";
$number_of_sentences = substr_count($content, '.');
$first_dot = stripos ($content, $dot, 0);
$second_dot = stripos ($content, $dot, $first_dot+1);
$third_dot = stripos ($content, $dot, $second_dot+1);
if ($first_dot) {
$first_sentence = substr($content, 0, $first_dot);
}
if ($second_dot) {
$second_sentence = substr($content, 0, $second_dot);
}
if ($third_dot) {
$third_sentence = substr($content, 0, $third_dot);
}
if ($number_of_sentences > 0) {
echo $first_sentence . '.<hr>'; //first sentence
}
if ($number_of_sentences > 1) {
echo $second_sentence . '<hr>'; //second sentence
}
if ($number_of_sentences > 2) {
echo $third_sentence . '<hr>'; // third
}
echo $number_of_sentences;
?>