我看到了下面的代码片段:if和else语句中“:”的用法是什么?
<?php
if(!empty($_POST)): // case I: what is the usage of the :
if(isset($_POST['num']) && $_POST['num'] != ''):
$num = (int)$_POST['num'];
....
if($rows == 0):
echo 'No';
else: // case II: what is usage of :
echo $rows.'Yes';
endif;
我想知道的是什么用法“:”在PHP代码。
我开了这个问题,认为它是关于某种倒退三元运算 – 2010-07-16 20:12:18