下面这个html字符串,如何用php的echo
或print
来输出?
<td width=275><input type="text" name="title" value="<?php echo $row['title']; ?>"></td>
echo "<td width=275><input type="text" name="title" value="<?php echo $row['title']; ?>"></td>"
不可以
echo '<td width=275><input type="text" name="title" value="<?php echo $row['title']; ?>"></td>'
也不可以
print <<<EOT
<td width=275><input type="text" name="title" value="<?php echo $row['title']; ?>"></td>
EOT;
也不可以,应为,这段html还包含php语句。
我的真实需求是
<?php
if(isset($_POST['flag'])
{
print <<<EOT
<td width=275><input type="text" name="title" value="<?php echo $row['title']; ?>"></td>
EOT;
else
{
}
?>
明月笑刀无情