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 Quote 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; ?> Quote Link to comment https://forums.phpfreaks.com/topic/260012-echo-br/#findComment-1332728 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.