What is "\r\n","\n","\\r\\n","\\n" in php

Discussion in 'PHP' started by baris22, Nov 26, 2007.

  1. #1
    hello,

    Can anyone tell me what they are one by one. I looked everywhere but could not see the answer.

    \r\n",
    "\n",
    "\\r\\n",
    "\\n"

    Thanks
     
    baris22, Nov 26, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    \r\n" - New line on windows systems.
    "\n" - New line on unix systems.
    "\\r\\n" - Escaped windows new line character. (Displays "\r\n" instead of a new line)
    "\\n" - Escaped new line on unix (Displays "\n" instead of a new line)
     
    nico_swd, Nov 26, 2007 IP