Cyto Posted March 30, 2012 Share Posted March 30, 2012 Hi, I can't figure out how to echo <br/> after 14 characters every line from text. Any idea's? Cyto Link to comment https://forums.phpfreaks.com/topic/260012-echo-br/ Share on other sites More sharing options...
QuickOldCar Posted March 30, 2012 Share Posted March 30, 2012 Use wordwrap() example: <?php $text = "The quick brown fox jumped over the lazy dog. And the lazy dog didn't move."; $newtext = wordwrap($text, 14, "<br />\n"); echo $newtext; ?> Link to comment https://forums.phpfreaks.com/topic/260012-echo-br/#findComment-1332728 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.