wordwrap() doesn't break at your line limit if a word has more characters than the limit. : wordwrap String PHP

 
<?php
$string = "this is a test. this is a test.this is a test.this is a test.this is a test.";
$string .= "this is a test.this is a test.this is a test.this is a test.this is a test.!";
print wordwrap( $string, 24, "<br/>n", 1 );
?>