This article introduces operators. This is PHP ?:Run. It is also called the ternary or ternary operator. Friends who need to learn can refer to it.
The very simple ternary operator is also what we often talk about? : Operator
代码如下 |
复制代码 |
$a=1;$b=2;$c=3;$d=4;
echo $a<$b?'xx':$a<$c?'yy':$a<$d?'zz':'oo';
?> |
http://www.bkjia.com/PHPjc/629226.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629226.htmlTechArticleThis article introduces about operators, which is php?:run, also called ternary or ternary Operators, friends who need to learn can refer to it. The very simple ternary operator is what we often say...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn