Carraige Return

Discussion in 'PHP' started by tdd1984, Feb 2, 2009.

  1. #1
    I have been working with PHP for awhile now, but I'm still confused about the carriage return. Does any one know where I can get a in-depth details about carriage returns?

    Also what's the difference in using /r/n together vs just /r?
     
    tdd1984, Feb 2, 2009 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Danltn, Feb 2, 2009 IP
  3. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #3
    /r/n is used in windows for new line
    /r just r alone is no such thing
    /n is used in unix for new line.

    to be safe, i always use PHP_EOL, it is cross-platform.

    When you open a unix text file in notepad, it is too dumb to realize /n is a new line, it just ignores it. When you open unix text file in wordpad, it sees /n as a new line.
     
    Kaizoku, Feb 3, 2009 IP