Jump to content

word wrap in emails help needed


stuckwithcode

Recommended Posts

Hello, I understand how wordwrap works in php and have used it well before.  However when I used wordwrap on a variable that is going to be emailed it puts the line breaks in well before it should.  The code is below.

 

$name = thisisaname

$email = thisisanemail

 

$text = "Account name:"."  ".$name."      "."Account email:"."  ".$email."\r"."\r";

 

$text = wordwrap($text,90,"\r");

 

If i change word wrap to 50 it wraps it after the word Account? any help.

 

Link to comment
https://forums.phpfreaks.com/topic/187843-word-wrap-in-emails-help-needed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.