word wrap in emails help needed

Posted on 16th Feb 2014 by admin

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

Other forums