Jump to content

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


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";
?>

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.