» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2006, 10:45 AM
odero odero is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
odero is on a distinguished road
Default going to put newline in string

hello pals
I'm storing text in the database that will be used as the body of an email sent with the mail() function.
How do I store newlines in middle of the text so that the person viewing the e-mail will see the text on a new line?

Thanks in advance for reply -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 09-13-2006, 10:50 AM
cronje cronje is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
cronje is on a distinguished road
Default

\n is the newline escape character
$string = "a\nb"; will show a and b on two different lines -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  #3  
Old 09-13-2006, 10:52 AM
zainab zainab is offline
OSP Starters
 
Join Date: Sep 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
zainab is on a distinguished road
Default

And IIRC you will need to use "\r\n" at the end of your headers as opposed to "\n". Just for further explanation, "\n" is a line feed and "\r" is a carriage return -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
string conversion. Glogi MySQL Forums 1 03-10-2007 08:19 AM
string count in ASP rahul ASP forums and Tips 1 08-26-2006 01:15 PM
unicode string support? Keshu MySQL Forums 1 08-16-2006 06:38 AM
Split String kelli PHP Programming and Tips 1 03-02-2006 06:37 AM
Need to change a Date String johny ASP forums and Tips 1 12-08-2005 06:09 AM


All times are GMT. The time now is 05:21 PM.