Is a new line = \n OR \r\n?

前端 未结 4 1379
陌清茗
陌清茗 2020-11-28 08:44

I\'ve seen many developers use different methods to split a string by new lines, but i\'m confused which is the correct: \\r\\n OR \\n only?

4条回答
  •  醉酒成梦
    2020-11-28 08:53

    For php, \n should work for you!

    http://php.net/manual/en/language.types.string.php

提交回复
热议问题