What is the difference between:
'\r' and '\n'
I know that they are used as a carriage returm, is it possible to use them seperately or are they always used in conjunction with each other?
Thanks,
Rob.
Carriage Return
Moderator: General Moderators
Re: Carriage Return
They're simply two different characters. \r is a carriage return, \n is a line feed.
Mostly for line endings: Unix uses \n, Windows uses \r\n, and Mac uses \r.
Mostly for line endings: Unix uses \n, Windows uses \r\n, and Mac uses \r.
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
Re: Carriage Return
Thanks for clearing that one up!
Rob.
Rob.
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Carriage Return
Does the newer OS X still use \r or the unixy \n or does it depend upon the program? I would assume that whatever the GUI apps use, vi or other such unixy program would still use \n.tasairis wrote:They're simply two different characters. \r is a carriage return, \n is a line feed.
Mostly for line endings: Unix uses \n, Windows uses \r\n, and Mac uses \r.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.