php - phpmailer body with variables -
i'm trying implement "forgotten pass" php script generate new password , send email user. until moment i'm trying send new password user. cant include variable in body of email. error on line:
$mail->body = "the new password "$newpass"."
in browser im getting
parse error: syntax error, unexpected '$newpass' (t_variable)
i know im missing something, dont know what... suggestions more welcome
regards
format such:
$mail->body = "the new password " . $newpass . ".";
you use:
$mail->body = "the new password {$newpass}.";
php has loads of handy string tricks buried in manual here.
Comments
Post a Comment