atitthaker Posted August 18, 2006 Share Posted August 18, 2006 I am understanding that there is difference between line feed and carriage return but I am not getting the desired output."This is \nsample string."shall printThis is sample string.and"This is \rsample string."shall printThis is sample string.Right?But I am getting next line from the first column only.Plz help... Link to comment https://forums.phpfreaks.com/topic/17935-carriage-return-and-line-feed-diff/ Share on other sites More sharing options...
AndyB Posted August 18, 2006 Share Posted August 18, 2006 Think about a typewriter. A line feed moves the print head down. A carriage return moves the print head to the extreme left. A line feed AND a carriage return (\r\n) moves the print head down AND to the left. Link to comment https://forums.phpfreaks.com/topic/17935-carriage-return-and-line-feed-diff/#findComment-76696 Share on other sites More sharing options...
Jenk Posted August 18, 2006 Share Posted August 18, 2006 now also bear in mind it varies across platforms.*nix is just \nwindows is \r\nand mac is strangely \n\r Link to comment https://forums.phpfreaks.com/topic/17935-carriage-return-and-line-feed-diff/#findComment-76698 Share on other sites More sharing options...
Daniel0 Posted August 18, 2006 Share Posted August 18, 2006 [quote author=Jenk link=topic=104738.msg417927#msg417927 date=1155904584]and mac is strangely \n\r[/quote]I believe Mac is just \r or have I misunderstood something.... Link to comment https://forums.phpfreaks.com/topic/17935-carriage-return-and-line-feed-diff/#findComment-76701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.