- implode: documentation ( source)
- explode: documentation ( source)
- wordwrap: documentation ( source)
<?php
$str= 'A rough criminal gets into an argument over a girl in a dance hall. The argument turns into a fight, and the criminal is shot. As everyone else looks on,...';
$x = '90';
$array = explode( "\n", wordwrap( $str, $x));
echo implode("<br>",$array);
?>