简单的PHP真的,只是不能得到它出于某种原因...包含在PHP回声内PHP和HTML
<?php
$myvalue = 'yes'
if ($myvalue == 'yes') {
echo 'This is some test content, within which is some more php bits
<?php echo 'Test'; ?> and an if statement
<?php if ($anothervalue = "test") { echo 'Print this'; } else
{ echo 'Print that' ; } ?>
And then some more content
<br />
Test
?>
} else {
echo 'The value didnt match';
}
?>
我需要包括回声里面的PHP,我怎么能做到这一点?
使用串联。 echo'该值不匹配:'。$ myvalue; – Juck
使用'“文本文本<?php echo'我是php';?>”'或者转义字符串''文本文本<?php echo'我是php' ?>''。如果你想实际打印php代码。 Else''text“。$ var。”text“.func()。”text“'。 –