/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function breakUpLongLines( $text, $maxLength=80 ) { $counter = 0; $newText = ''; for( $i = 0; $i <= $textLength; $i++ ) { } for( $x = 0; $x < $textLength; $x++ ) { { $counter = 0; } else { $counter++; } $newText .= $array[ $x ]; if( $counter >= $maxLength ) { $newText .= ' '; $counter = 0; } } return $newText; }
Comments
