- implode: documentation ( source)
- explode: documentation ( source)
- wordwrap: documentation ( source)
<?php
$str= 'This is some example text , I want to print this variable in 3 lines, also.';
$x = '90';
$array = explode( "\n", wordwrap( $str, $x));
echo implode("<br>",$array);
?>