rapier7 Posted March 2, 2009 Share Posted March 2, 2009 I'm currently working on my own little website and I'm wondering how I would make form entry easier. My primary problem has to do with entries. There is a text box where you would type something in and it would redisplay it on the browser. How do I make it so that by hitting enter twice, the text would show that when it is redisplayed on the browser instead of manually inserting the <p> tags? Help would be appreciated. Thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/147496-solved-easier-form-entry/ Share on other sites More sharing options...
br0ken Posted March 2, 2009 Share Posted March 2, 2009 Are you asking how to convert presses of the enter key to line breaks? If so try this: echo nl2br($content); http://uk3.php.net/nl2br Quote Link to comment https://forums.phpfreaks.com/topic/147496-solved-easier-form-entry/#findComment-774292 Share on other sites More sharing options...
rapier7 Posted March 2, 2009 Author Share Posted March 2, 2009 That nl2br is awesome. Thanks, man. Edit: Hey, is there a br2nl feature? Because I need forms to convert to HTML nicely and then HTML to convert into forms as well. Edit2: Nevermind. I need to be less lazy. Quote Link to comment https://forums.phpfreaks.com/topic/147496-solved-easier-form-entry/#findComment-774369 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.