Demonic Posted August 29, 2006 Share Posted August 29, 2006 alright im using nl2br() to make new lines and i got a textarea to view your current signatureis thier a way for the <BR>'s to be hidden in edit script script but the <br> still work?'like hidden <BR>'s in textarea's Link to comment https://forums.phpfreaks.com/topic/19078-nl2br-question/ Share on other sites More sharing options...
hitman6003 Posted August 29, 2006 Share Posted August 29, 2006 [quote]is thier a way for the <BR>'s to be hidden in edit script script but thestill work?[/quote]That doesn't make sense Link to comment https://forums.phpfreaks.com/topic/19078-nl2br-question/#findComment-82517 Share on other sites More sharing options...
wildteen88 Posted August 29, 2006 Share Posted August 29, 2006 Use str_replace:[code]$text = str_replace(array("<br>", "<br />"), '', $text);[/code]I guess you use nl2br when inserting data to the database, this is not recommended. You should save data in its raw state in the database. Then you format the data how you want it to be displayed when you get it out of the database. Link to comment https://forums.phpfreaks.com/topic/19078-nl2br-question/#findComment-82527 Share on other sites More sharing options...
trq Posted August 29, 2006 Share Posted August 29, 2006 Also, you'd be much better off storing th eplain text in the database and using nl2br() on the way out. Link to comment https://forums.phpfreaks.com/topic/19078-nl2br-question/#findComment-82540 Share on other sites More sharing options...
Demonic Posted August 30, 2006 Author Share Posted August 30, 2006 wow wildteen and thorpe is back :) *waves*thanks ill fix it now :) Link to comment https://forums.phpfreaks.com/topic/19078-nl2br-question/#findComment-82543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.