我想補充這個表電子郵件:添加SQL結果表到郵件
foreach ($songs as $key => $value) {
echo "<tr><td>" . ucfirst($key) . "</td><td>" . $value . "</td></tr>";
}
但像這樣將無法工作:
$message = '
<html>
<head>
</head>
<body>
<p>Hi, ' . ucfirst($name) . '<br>
</p>
<p>Heres the table</p>
<table class="tables">' .
foreach ($songs as $key => $value) {
echo "<tr><td>" . ucfirst($key) . "</td><td>" . $value . "</td></tr>";
}
. '
</table>
</body>
</html>
';
謝謝提前! :)
你發送正確的標題與HTML郵件? – Elen 2012-01-31 14:53:42