|
Posted by weirdstuff on 03/20/06 13:06
Errr, what? :)
Ok I had figured that a backslash was being added when I read the
string from DB, but all my attempts of correcting that have failed.
What we have here is a case where knowing how the output is formatted
_exactly_ is very important. So it would be nice to be able to
"manually" format stuff like newlines and breaks.
Now, your suggestions:
>So, what you have to do is change your formatting characters. Replace
>"\\n" with "\n" and "\\r" with "\r", for instance.
The string already has single backslash in the database. If I add
another "just for fun" I just get two in the output. If I then do a
stripslashes() on one or the other then that doesn't help either.
>Or, alternatively, put the actual characters themselves in the database.
Thats exactly what I'm trying not to do.
So we can agree that the problem is when I am getting the string from
the database. Then PHP (or MySQL?) does some funkyness to the string
variable which makes PHP think that \n means it should print
"backslash" and "en"
Jolly good show. Now lets fix it! :)
Navigation:
[Reply to this message]
|