如何使用 php 在表格中使用替代宽度?我用这种方式但得到错误。
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="{if $label_payment}{echo = 50%}{else}{echo = 100%}{/if}">Shipping Address
</td>
<td>Payment Address
</td>
</tr>
<tr>
<td width="{if $label_payment}{echo = 50%}{else}{echo = 100%}{/if}">{$address_label_shipping}
</td>
{if $address_label_payment}
<td width="50%">{$address_label_payment}
</td>
{if}
</tr>
</table>
这是正确的方法吗?
{if $label_payment}{echo = 50%}{else}{echo = 100%}{/if}