jrodd32 Posted November 8, 2006 Share Posted November 8, 2006 I have a script that sends e-mail and I am trying to format the body of the message. right now the code looks like:[code]$message=" ID: $row[id] Name: $row[lname] $row[suffix], $row[fname] Home Phone: $row[homephone] Work Phone: $row[workphone] E-Mail: $row[email] $explaination";[/code]I would like for it to be in a table and some other HTML tags that would make it look nicer and more professional. However, because it is inside the " " the HTML tags just print as they are instead of being functional. Is there a way around this method of using the " " to build my message body?thanks Link to comment https://forums.phpfreaks.com/topic/26614-fomatting-question/ Share on other sites More sharing options...
blear Posted November 8, 2006 Share Posted November 8, 2006 Are you viewing the email with an HTML-enabled email program? If not, then you wont be able to use HTML tags to format the email msg. Link to comment https://forums.phpfreaks.com/topic/26614-fomatting-question/#findComment-121732 Share on other sites More sharing options...
jrodd32 Posted November 8, 2006 Author Share Posted November 8, 2006 Yeah, that's not the problem. I am talking about getting around a PHP issue because it will print exactly what is contained within the " "'s. I need to alter the script so that I can format my output, but I don't know how. Link to comment https://forums.phpfreaks.com/topic/26614-fomatting-question/#findComment-121735 Share on other sites More sharing options...
blear Posted November 8, 2006 Share Posted November 8, 2006 Do you mean the $row[id] is outputted as $row[id] and not the value of $row[id] ? If this is the case, use the concatinate string doohicky.[code]$message=" ID: ".$row[id]." Name: ".$row[lname]." ". $row[suffix].", ".$row[fname]." Home Phone: ".$row[homephone]." Work Phone: ".$row[workphone]." E-Mail: ".$row[email]." ".$explaination;[/code] Link to comment https://forums.phpfreaks.com/topic/26614-fomatting-question/#findComment-121748 Share on other sites More sharing options...
jrodd32 Posted November 8, 2006 Author Share Posted November 8, 2006 No if i had some html code it would appear like this:Ex.message="<html><b>ID#:</b></hmtl> $row[id];etc."would print exact like: <html><b>ID#:</b></html> 1002 in the message because PHP prints exactly what is within the " " and I am trying to either get around this or have some other solution to building the message body within the " ". Link to comment https://forums.phpfreaks.com/topic/26614-fomatting-question/#findComment-121749 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.