erfg1 Posted October 6, 2006 Share Posted October 6, 2006 When I made my form php powered, and you fill out a <TEXTAREA>, it does spaces, but the spaces dont show when displaying the mysql content onto a website. How would I make it so you can do <BR>'s instead of mysql's space downs. I assume it has something to do with str_replace. Quote Link to comment https://forums.phpfreaks.com/topic/23148-php-form/ Share on other sites More sharing options...
hostfreak Posted October 6, 2006 Share Posted October 6, 2006 Check out http://www.php.net/nl2br . I am pretty sure it will do what you are seeking. Quote Link to comment https://forums.phpfreaks.com/topic/23148-php-form/#findComment-104805 Share on other sites More sharing options...
Daniel0 Posted October 6, 2006 Share Posted October 6, 2006 It do not do spaces, it actually makes line breaks, but linebreaks show up as spaces when the HTML is rendered and the <br> ('break line' or something like that) represents the line break. In order to convert the line breaks into HTML line breaks you would have to use the function hostfreak showed you or make one yourself, but making a function that already exists would be sort of stupid. Quote Link to comment https://forums.phpfreaks.com/topic/23148-php-form/#findComment-104806 Share on other sites More sharing options...
erfg1 Posted October 6, 2006 Author Share Posted October 6, 2006 Thank you very much hostfreak. That was exactly what I was looking for. Quote Link to comment https://forums.phpfreaks.com/topic/23148-php-form/#findComment-104808 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.