菜鸟问题,php中的if then endif 怎么写 这段代码用正则表达式该如何查找? </if<?php end...
php if\u5224\u65ad\u8bed\u53e5\u8981\u600e\u4e48\u5199\uff1fPHP\u4e2dif\u8bed\u53e55\u79cd\u5199\u6cd5
<?php
\u5168\u9009\u590d\u5236\u653e\u8fdb\u7b14\u8bb0 // one
if (condition) {
...
} else {
...
}
// two
if (condition) :
...
else:
...
endif;
// three
condition ? true : false ;
// four if\u540e\u9762\u7d27\u63a5\u7740\u5224\u65ad\u4e3atrue\u6240\u6267\u884c\u7684\u4ee3\u7801\uff0c\u53ef\u5206\u4e24\u884c\u5199\uff0c\u53ea\u6709\u4e00\u4e2a\u5206\u53f7
if (condition) ... ;
//five \u4f7f\u7528\u77ed\u8def\u4e0e\u548c\u77ed\u8def\u6216
expression1 && expression2;
expression1 || expression2;
]
\u5373\u53ef
\u89e3\u91ca\uff1a
</if #\u5339\u914d</if
[^>] #\u5339\u914d\u6240\u6709\u975e>\u7684\u5b57\u7b26
\u8fd8\u53ef\u4ee5\u8fd9\u6837\uff1a
)
(?!>)\u65ad\u8a00\u540e\u9762\u4e00\u4e2a\u4e0d\u80fd\u662f>
\u597d\u5904\u662f\u4e0d\u5339\u914d\u540e\u9762\u4e00\u4f4d\uff0c\u53ef\u4ee5\u76f4\u63a5\u66ff\u6362\u4e3a
<?php
$message = '我的留言';
?>
<div class="formbox">
<?php if ($message): ?>
<table id="1">
<!--留言发表的table-->
</table>
<?php else: ?>
<table id="2">
<!--发表以后显示留言的table-->
</table>
<?php endif; ?>
</div>
http://php.net/manual/zh/language.basic-syntax.phpmode.php
不好意思,没说清楚,我见过asp的那个写法,想来问问php中的写法,
应该是问php模板中if语句怎么写
-0-
这是我的模板.htm
<div class="formbox">
<table id="1">
<!--留言发表的table-->
</table>
<table id="2">
<!--发表以后显示留言的table-->
</table>
<!--/翻页代码-->
<div>
扩展阅读:菜鸟工具在线编程 ... php菜鸟编程在线 ... 菜鸟app ... 菜鸟 ... php为什么快被淘汰了 ... php视频教程 ... c#教程 菜鸟 ... 菜鸟教程官网 qt ... python编程入门自学 ...