Jump to content

nl2br() question


Demonic

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.