phpde bunun için wordwrap fonksiyonu var.
http://php.net/manual/en/function.wordwrap.php
Alıntı
<?php
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap($text, 20, "<br />\n");
echo $newtext;
?>
Kodun Çıktısı
Alıntı
The quick brown fox<br />
jumped over the lazy<br />
dog.