$string = "This is my page content. This text will be paginated.";
$pageNo = "0";
$pieceLength = "12";
$preparedForPrint = substr($string,$pageNo,$pieceLength);
what i want to do is if the 12th character is inside a word(the 12th character is not a space) i want to move my cursor 'till it finds a space an return that substring despite the fact that is more than 12 characters long. how can i do that? thanks