maestrodamuz Posted December 25, 2008 Share Posted December 25, 2008 I am new to core PHP programming, I have always beeen the dreamweaver type, but now I need to begin to know why what is what. So I have been wondering what this function is used for, I have searched through the net but no solution yet. Link to comment https://forums.phpfreaks.com/topic/138395-what-is-n-used-for-in-php/ Share on other sites More sharing options...
revraz Posted December 25, 2008 Share Posted December 25, 2008 Nothing in PHP, but it's either a line feed or a carriage return in HTML, can't remember which. Link to comment https://forums.phpfreaks.com/topic/138395-what-is-n-used-for-in-php/#findComment-723603 Share on other sites More sharing options...
chronister Posted December 25, 2008 Share Posted December 25, 2008 It is a newline character. It does nothing for the actual script, but gives a newline in the source code. Or wen dealin with plain text email, it creates a newline as in plain text email <br> will not do anything. Nate Link to comment https://forums.phpfreaks.com/topic/138395-what-is-n-used-for-in-php/#findComment-723635 Share on other sites More sharing options...
corbin Posted December 25, 2008 Share Posted December 25, 2008 The technical definition of it, since the other two posts have just told you its name and what it's used for: It stands for, and is parsed into by the PHP engine, the value of the newline character. In ASCII, for example, the new line character is 10 (in decimal), so a char with a value of 10 would be a new line. In C or some other lower level language it would make more sense. In C: char c1 = '\n'; char c2 = 10; Those would be the same in memory or as human readable output. Hrmm, so I guess this post didn't add anything new.... Oh well, already typed it. Link to comment https://forums.phpfreaks.com/topic/138395-what-is-n-used-for-in-php/#findComment-723641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.