Home > Backend Development > PHP Tutorial > PHP ternary operator in detail_PHP tutorial

PHP ternary operator in detail_PHP tutorial

WBOY
Release: 2016-07-13 17:13:14
Original
1546 people have browsed it

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';
?>

www.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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template