Jump to content

What is /t /r /n?


cowsdonthack
 Share

Recommended Posts

WHAT THE FLAMING ######ITY ###### ARE THESE THINGS?I Add and remove them to my code and they do NOTHINGI can't Google ThemI can't find them in ForumsBUT I SEE PEOPLE USING THEMI SEE PEOPLE HAVING PROBLEMS WITH IT IN PHP 5.3BUT NO ONE EXPLAINS WHAT IT ISITS NOT EVEN IN THE PHP MANUAL (or if they are... They can't be searched because THEYRE ONE RECOGNIZABLE CHARACTER LONG!Thanks.

Link to comment
Share on other sites

Typed correctly, they are escape sequences that correspond to one ASCII character each\t = tab\r = carriage return\n = linefeed ("newline")To be interpreted correctly by PHP they must be placed in "double" quote marks.They do not print out as HTML, so they are invisible in browser view. You should see tabs and line breaks correctly if you View Source.

Link to comment
Share on other sites

Typed correctly, they are escape sequences that correspond to one ASCII character each\t = tab\r = carriage return\n = linefeed ("newline")To be interpreted correctly by PHP they must be placed in "double" quote marks.They do not print out as HTML, so they are invisible in browser view. You should see tabs and line breaks correctly if you View Source.
Thank you...Thank you thank you thank you.
Link to comment
Share on other sites

Thank you...Thank you thank you thank you.
Different operating system families have different line-ending conventions. When you write a text file and want to insert a line break, you need to use the correct line-ending character(s) for your operating system.Unix based systems use \n as the line ending characterMacintosh based systems use \r as the line ending characterWindows based systems use \r\n as the line ending charactersYou may like to check out the note under the $mode parameter of the fopen() function for more information about the use of these characters in PHP.Roddy
Link to comment
Share on other sites

I Add and remove them to my code and they do NOTHING
They do nothing? You mean all this time, when all of these people have been using them, they haven't actually been doing anything? Maybe you should let everyone know.
I can't Google Them
Maybe you're just not trying hard enough:http://www.google.com/search?q=%22%5Cn%22+php
BUT I SEE PEOPLE USING THEM
Well, why didn't you just ask someone what they were? You would have heard the term "escape sequence", then you could have looked that up:http://www.google.com/search?q=escape+sequence
I SEE PEOPLE HAVING PROBLEMS WITH IT IN PHP 5.3
THAT'S BECAUSE NO ONE BOTHERS TO LEARN HOW ANYTHING WORKS BEFORE THEY USE IT.
ITS NOT EVEN IN THE PHP MANUAL (or if they are... They can't be searched because THEYRE ONE RECOGNIZABLE CHARACTER LONG!
Instead of searching through the manual, just start at the beginning and read until the end. If you're trying to write PHP code and you haven't read through or even glanced at the "Language Reference", "Security", and "Features" sections in the manual, then you're wasting your time (and the time of those you yell at online):http://www.php.net/manual/en/index.phpThe part you're looking for is in the Types section, only the second section in the Language Reference. It wouldn't kill you to read through it at least once.
Link to comment
Share on other sites

I'm going to channel my inner Glenn Beck, where I start crying before explaining that "I just love this internet".
ahhh...nothing like a little white lie to assuage the masses.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...