“Php/keyword else”的版本间差异
来自菜鸟教程
(Bot commit) |
小 (机器人:添加分类Php基础教程) |
||
第1行: | 第1行: | ||
− | |||
= PHP else关键字 = | = PHP else关键字 = | ||
第44行: | 第43行: | ||
[[../php_ref_keywords|Keywords PHP关键字]]<br /> | [[../php_ref_keywords|Keywords PHP关键字]]<br /> | ||
+ | |||
+ | [[分类:Php基础教程]] |
2020年11月12日 (四) 08:45的最新版本
PHP else关键字
例
条件满足时运行一些代码 not met:
<?php if (5 < 3) { echo "Five is less than three"; } else { echo "Five is not less than three"; } ?>
定义和用法
The
else
关键字指定一个代码块,如果不满足ifstatement的条件,则应运行该代码块。
相关页面
The
if
关键词。
The
elseif
关键词。
阅读更多有关if ... elseif ... else条件的信息 PHP否则教程
.