Click to See Complete Forum and Search --> : More than line breaks?
ppg3412
07-18-2003, 01:09 AM
Curious,
I know what the piece of text "\n" does; It makes a new line in a string of text.
But I've seen similar things, such as "\r" or "\f" and more.
What are these are these things really called, and are there more of them?
epimeth
07-18-2003, 01:21 AM
\r is a carriage return... in windows \r\n takes you to the begining of the next line... in linux \n suffices to do both...
as for some others... I know one is a tab, another tells the system speaker to go 'ding'... one's a backspace... i don't remember them all... google it, I'm sure you'll find something
ppg3412
07-18-2003, 01:25 AM
Thanks, but Google strips out any slashes. :( That's why I came here. :D
Weedpacket
07-18-2003, 01:37 AM
The ones PHP recognises are also given in the manual (where you will also find out what they're called, and hence have more ammunition for Google).
epimeth
07-18-2003, 01:38 AM
http://www-ccs.ucsd.edu/c/charset.html
Character Meaning
space leave blank space
BEL signal an alert (BELl)
BS go back one position (BackSpace)
FF go to top of page (Form Feed)
NL go to start of next line (NewLine)
CR go to start of this line (Carriage Return)
HT go to next Horizontal Tab stop
VT go to next Vertical Tab stop
Character Escape Sequence
" \"
' \'
? \?
\ \\
BEL \a
BS \b
FF \f
NL \n
CR \r
HT \t
VT \v
ppg3412
07-18-2003, 01:44 AM
Ah, I see.
Thank you both! :D
Moonglobe
07-18-2003, 03:43 AM
i think that PHP only reconizes: \r,\n, and \t . you can escape any character but ive only ever used anything but those and \", \', for ereg([_]?.*) functions.
goldbug
07-18-2003, 10:35 AM
Don't forget: "new line" on Macs (older ones at least) is \r :)
laserlight
07-19-2003, 02:57 AM
Originally posted by Moonglobe
i think that PHP only reconizes: \r,\n, and \t . you can escape any character but ive only ever used anything but those and \", \', for ereg([_]?.*) functions.
well, you need to read the PHP manual too
Moonglobe
07-19-2003, 10:41 AM
Originally posted by laserlight
well, you need to read the PHP manual too
yup, i probably do, but i know for a fact that \a and \b arn't supported...... i dont think \f is either. as for \v i forget bt then again.......Originally posted by Moonglobe
i think :mad: and of course i did forget about \\ .... but o well we all make mistakes!
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.