Jump to content

Fast Question : What does it means ! n\ and r\


egturnkey

Recommended Posts

\n is a newline

\r is a carraige return

\t is a tab

 

Thats it really. They are just for text documents. For instance take a look at:

<?php 
print "<h1>Hello</h1>";
print "<p>This is some text</p>";
?>

Run this code and take a look at 'view source' in your browser. See how the text document displays the HTML.

Now run this code and do the same.

<?php 
print "<h1>Hello</h1>\n";
print "<p>This is some text</p>\n";
?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.