faqts : Computers : Programming : Languages : PHP : Common Problems : Strings

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

7 of 11 people (64%) answered Yes
Recently 6 of 9 people (67%) answered Yes

Entry

How do I include a quotation mark in a string, and then email that string to myself?

Dec 11th, 2001 20:36
Shao Sean, Alex Stanford,


two options:

1) Use single quotes
$string = '"this is quoted"';

2) Escape the quotes
$string = "\"this is quoted\"";


as for emailing, take a look at the 'mail' function
<http://www.php.net/manual/en/function.mail.php>

syntax:
bool mail (string to, string subject, string message [, string 
additional_headers, string [additional_parameters]])

example:
mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3");