php/mysql \ n into xml
php/mysql \ n into xml
- Started
- Last post
- 4 Responses
- jpea
so, i have a < textarea > that a user can just press return for a line break and it's preserved in mysql as such. trouble is, when i use php to form an xml node out of this blob, it doesn't bring in the \n line breaks. any way to not strip out that data?
- jpea0
but i can't have < br > tags in my xml... i'd like to just carry over the \ n
- Anarchitect0
you could print your code inside CDATA tags. your html will be preserved.
- UndoUndo0
str_replace("\r","",$yrString);
before going to mysql