/    Sign up×
Community /Pin to ProfileBookmark

php characters (n, …)

hey!

I want to send a plain text email newsletter.
To give it some layout, I want to use the wellknown ‘tab’. However, does this exist?
I only know of n for a new line. Are there any others? I can’t find any info on php.net ?

cheers

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@BeachSideJun 30.2005 — " " (ASCII 32 (0x20)), an ordinary space.

"t" (ASCII 9 (0x09)), a tab.

"n" (ASCII 10 (0x0A)), a new line (line feed).

"r" (ASCII 13 (0x0D)), a carriage return.

"" (ASCII 0 (0x00)), the NUL-byte.

"x0B" (ASCII 11 (0x0?), a vertical tab.
Copy linkTweet thisAlerts:
@HaganeNoKokoroJun 30.2005 — According to http://ca.php.net/types.string, php supports the following escape codes for [b]double-quoted[/b] strings:n linefeed (LF or 0x0A (10) in ASCII)

r carriage return (CR or 0x0D (13) in ASCII)

[color=blue]t horizontal tab (HT or 0x09 (9) in ASCII)[/color]

backslash

$ dollar sign

" double-quote

[0-7]{1,3} the sequence of characters matching the regular expression is a character in octal notation

x[0-9A-Fa-f]{1,2} the sequence of characters matching the regular expression is a character in hexadecimal notation[/quote]
Copy linkTweet thisAlerts:
@ShrineDesignsJun 30.2005 — or you could just format it like this[code=php]<?php
$msg = <<<MSG
this is the body of an email

sent from {$foo} at {$bar}

greetings {$name}

{$some_text}
MSG;

?>[/code]
Copy linkTweet thisAlerts:
@Bobby_SauthorJul 02.2005 — yep, this last one is the more convenient to use I guess,

thanks for the help!
×

Success!

Help @Bobby_S spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...