OK! I found out a way to do this.. Since there might be anybody else browsing the archive looking for the same, I'll post the code. Keep in mind that I'm a newbie and don't have much experience. There probably is a lot faster and better ways to do this.
function split_text($text, $page){
$len = 160; //number of words
if ($page == 1){
$start = 0;
$end = ($page * $len) - 1;
} elseif ($page > 1){
$end = ($page * $len) - 1;
$start = ($end - $len) + 1;
}
$words = Array();
preg_match_all('/([^ ]) /', $text, $words);
for($n = $start;
$n <= $end;
$n++){
$newsbite .= $words[0][$n] . ' ';
$next_chap = strlen($newsbite);
if ($next_chap == $len){
$newsbite = "";
}
}
return $newsbite;
}
If the $newsbite returns nothing, go to next chapter.
F