Quotes within php quote -


i put quotes around "name" within php header sending email. gives me php error when doing so.

$headers = "from: "name" " . "\r\n";

how can work quotes around name?

i tried 'name' doesnt work when email shows server.

you have escape quotes backslash:

$headers = "from: \"name\" " . "\r\n"; 

for more information on possible escapes refer php manual on strings.

another solution using single quoted strings, don't have variables or other escapes in there:

$headers = 'from: "name" ' . "\r\n" 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -