mapleleaf Posted June 9, 2009 Share Posted June 9, 2009 <p class="message">Message:<br><?php echo wordwrap($message,30); ?></p> Any idea why this isn't wrapping? It is echoing out the posted data of a textarea. I removed htmlentities in case that was affecting it Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted June 9, 2009 Share Posted June 9, 2009 You probably want it to be <p class="message">Message:<br><?php echo wordwrap($message,30,'<br />'); ?></p> if you wanted the word wrapping to actually be visible in the rendered page. The default wrapping is \n, which is not rendered by the browser as a line break. Quote Link to comment Share on other sites More sharing options...
mapleleaf Posted June 9, 2009 Author Share Posted June 9, 2009 Tried that. Still not wrapping. Any other thoughts? Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted June 9, 2009 Share Posted June 9, 2009 It's working for me, what is $message's value? Quote Link to comment 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.