我们的MySQL数据库中某些字段似乎包含换行符,因此如果我在它们上执行SELECT操作,将会为单个SQL调用返回以下内容:
Life to be sure is nothing much to lose
But young men think it is and we were young
如果我想在网页上显示该字段时保留换行符,标准解决方案是编写脚本将'\n\r'替换为br HTML标签,还是有更好的方法?
谢谢!
我们的MySQL数据库中某些字段似乎包含换行符,因此如果我在它们上执行SELECT操作,将会为单个SQL调用返回以下内容:
Life to be sure is nothing much to lose
But young men think it is and we were young