I've done it like so:
if(strlen($block_text) > 2000) {
$half = strlen($block_text)/2;
$second_half = substr($block_text, $half);
$block_text = substr($block_text, 0, $half);
}
but the problem here is that the $second_half
starts in the middle of a word and the $block_text
ends in the middle of a word. Could it be possible to tweak it somehow so that the first half ends after a dot .
?