📜  php 三元运算符 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:45.007000             🧑  作者: Mango

代码示例6
$foo = your_value;
$bar = ($foo == 1) ? "1" : (($foo == 2)  ? "2" : "other");
echo $bar;