我面临的问题是只有'rr_pos_1'标签
<?php if (isset($_POST['rr_pos_1']) ? $_POST['rr_pos_1'] : null) echo "$rr_pos_1"; ?>
由于撇号(')而输出php错误。无论如何我可以通过使用下面相同的打印方法来避免该错误吗?
这是我的php代码:
<?php
switch (isset($_POST['chk']) ? $_POST['chk'] : null){
case 'Rigid Rail':
echo '
<table>
<tr>
<td>Notes & Comments: <?php if (isset($_POST['rr_pos_1']) ? $_POST['rr_pos_1'] : null) echo "$rr_pos_1"; ?></th>
</tr>
</table>';
}
?>