我一直在一个php html电子邮件模板,我将需要隐藏一个表行时,php条件满足,我如何脚本它?
im使用$HTMLContent=“$HTMLContent=”;方法
下面是我的代码:
<tr style=""'. ($componentpro2Incwaste ==0 ? " display: none;" : "").'>
<td>'.$ForSKU.'</td>
<td>'.$Forption.'</td>
<td>'.$compwasteQty.'</td>
<td>£ '.$Fort.'</td>
</tr>
所以我想我在这条线上挣扎,似乎不起作用,有些帮助。
<tr style=""'. ($componentpro2Incwaste ==0 ? " display: none;" : "").'>
$htmlContent = '
<html>
<head>
<title>NewQuote from Warmup pro</title>
</head>
<body>
<h1>New quote</h1>
....
$htmlContent.= '</body></html>';
谢谢
试试这个,从style
开头删除一个双引号,然后添加到结尾: