请考虑以下代码:
<?php
$username = $_POST['username'];
echo 'How can I display a variable inside some html code using the echo in php?';
?>
答案 0 :(得分:0)
你可以使用像
这样的php标签在html中编写php代码<p class='test'><?php echo "test php" ?></p>
答案 1 :(得分:0)
<?php
$username = $_POST['username'];
echo 'How can I display a variable '.$username.' inside some html code using the echo in php?';
?>
<i><?php echo $username; ?></i>