replace \n with actual new line character code

前端 未结 5 1593
不知归路
不知归路 2021-02-19 03:49

I\'m pulling content from a DB that has been sanitized using mysql_real_escape_string. Accordingly the new line characters now appear as \"\\n\". The issue is that this content

5条回答
  •  情书的邮戳
    2021-02-19 04:25

    This might help a bit:

    echo('test\ntest'); shows as

    test test

    but echo("test\ntest"); shows as

    test

    test

提交回复
热议问题