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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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] Quote Link to comment 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 " ". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.