Hi, I'm trying to do the following: <?=wordwrap($text, 20, "\n", true);?> PHP: But it has no effect on the text? If I replace the \n with <br /> it works but this messes up the code in the text. Could anyone plase advise on this issue? Thanks
This works. <?php $text = "bla bla bla bla bla bla blaadsfadsfadadsfdsafdsafsfdsaf bla bla bla bla bla"; $text = wordwrap($text, 20, "\n", true); echo '<pre>'; echo $text; echo '</pre>'; ?> PHP:
Thanks that worked, Realised after that line breaks just put a line brake into the html and it doesn't show up on screen.