Opposite of nl2br? Is it str_replace?

后端 未结 8 1674
旧时难觅i
旧时难觅i 2020-12-02 00:07

So the function nl2br is handy. Except in my web app, I want to do the opposite, interpret line breaks as new lines, since they will be echoed into a pre-filled form.

<
8条回答
  •  时光说笑
    2020-12-02 00:57

    You'd want this:

    ',"\n",$foo)?>
    

    You probably forgot to use double quotes. Strings are only parsed for special characters if you use double quotes.

提交回复
热议问题