chriscloyd Posted May 29, 2006 Share Posted May 29, 2006 Okay im making a news post script it all works and enters it into the database when it displays the text it doenst come out how i put it in there unless i use html in it like<strong> HELLO </strong><br>How are you guys doing today?<br>thats what it comes out as if i do it that way but i just want to be able to hit enter with out putting html into it and haveing it add the html any easy way of doing this? Quote Link to comment https://forums.phpfreaks.com/topic/10732-html-php/ Share on other sites More sharing options...
bobleny Posted May 29, 2006 Share Posted May 29, 2006 This is the only code that I know. Id bet there are better ones but...thats what I use. You will have to addapt it to your own need.$message = nl2br(mysql_result($result,"message"));specificlly$X = nl2br(); Quote Link to comment https://forums.phpfreaks.com/topic/10732-html-php/#findComment-40085 Share on other sites More sharing options...
SharkBait Posted May 29, 2006 Share Posted May 29, 2006 nl2br = New Line 2 Break :)You'll still have to do your text formatting tags like <strong> and such, but at least this way it will read the database entry with cariage returns :) Quote Link to comment https://forums.phpfreaks.com/topic/10732-html-php/#findComment-40088 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.