【发布时间】:2011-09-28 02:58:14
【问题描述】:
我只是想整理一封简单的 HTML 电子邮件,确认我的数据库中的订单。
我的 $message 看起来有点像:
$message = "
<html>
<head>
<title>Whatever</title>
</head>
<body>
etc etc
</body>
</html>
";
我想要在 $message HTML 中做的是调用我的数据库,它将返回如下行:
$emailinfo=mysql_fetch_assoc($result) or die(mysql_error());
然后我可以在我的 $message 中使用以下内容:
<p><?php echo $emailinfo['customername'];?></p>
我的查询或表格等没有问题,我遇到的需要帮助的问题是将结果从 mysql_fetch_assoc 获取到我的 $message html 中。
谁能帮忙?
谢谢 丹
【问题讨论】:
-
...你的意思是像
$message = 'Hello '.$emailinfo['customername'].'!';?
标签: php