php代码和html代码语法混合写法,适用于(PHP 4, PHP 5, PHP 7):
<?php if ($a == 5): ?>
A is equal to 5
<?php }?>
<?php if ($a == 5){ ?>
A is equal to 5
<?php } ?>
等价于:
<?php
if ($a == 5):
echo "A is equal to 5";
endif;
?>
<?php
if ($a == 5){
echo "A is equal to 5";
}
?>
博客地址:http://blog.yoqi.me/?p=13869
这篇文章还没有评论