I am building an application where users can enter a note into a textarea. The note is then encoded when entered into the database. When I decode the returned value, the nl2br function isn t working. It isn t replacing the with the br tag. When not encoding/decoding text, it works.
我正在使用以下代码对我的信息进行编码/编码:。
如果我进入一个文本领域:
Hello
World
It encodes it, and then returns when decoded
Hello
World.
I can do a str_replace, but as I come to understand, depending on the browser, a textarea may use or instead of .
Not sure what a good solution is... please help! Thank you!