cowsdonthack Posted September 6, 2010 Share Posted September 6, 2010 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 More sharing options...
jeffman Posted September 6, 2010 Share Posted September 6, 2010 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 More sharing options...
cowsdonthack Posted September 6, 2010 Author Share Posted September 6, 2010 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 More sharing options...
jeffman Posted September 6, 2010 Share Posted September 6, 2010 FWIW, the online manual has some explanation here: http://php.net/manual/en/language.types.string.php . Scroll down a bit. Link to comment Share on other sites More sharing options...
Synook Posted September 6, 2010 Share Posted September 6, 2010 Stay calm... you can find more information about them in the PHP manual here. Link to comment Share on other sites More sharing options...
iwato Posted September 6, 2010 Share Posted September 6, 2010 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 More sharing options...
justsomeguy Posted September 7, 2010 Share Posted September 7, 2010 I Add and remove them to my code and they do NOTHINGThey 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 ThemMaybe you're just not trying hard enough:http://www.google.com/search?q=%22%5Cn%22+phpBUT I SEE PEOPLE USING THEMWell, 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+sequenceI SEE PEOPLE HAVING PROBLEMS WITH IT IN PHP 5.3THAT'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 More sharing options...
jeffman Posted September 7, 2010 Share Posted September 7, 2010 JSG, you really need to get in touch with your inner self. You're so laid back, who can even tell what you mean? Let some emotion shine through, man! Link to comment Share on other sites More sharing options...
justsomeguy Posted September 7, 2010 Share Posted September 7, 2010 I'm going to channel my inner Glenn Beck, where I start crying before explaining that "I just love this internet". Link to comment Share on other sites More sharing options...
thescientist Posted September 7, 2010 Share Posted September 7, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.