{~$i=rand(0,1)}
{~if($i):}
是
{~else:}
否
{~endif}
<hr />
{//无限循环语句;}
{~$i=0;}
{~while($i<2):}
{:$i++}<br />
{~endwhile}
<hr />
{//循环语句;}
{~for($i=0;$i<5;$i++):}
{$i}<br />
{~endfor}
<hr />
{//变态循环;}
{~$i=1}
{~for(;$i<5;$i++):}
{$i}<br />
{~endfor}
<hr />
{//变态循环2;}
{~$i=1}
{~for(;$i<5;):}
{:$i++}<br />
{~endfor}
<hr />
{//变态循环3;}
{~$i=1}
{~for(;;):}
{~if($i<5):}{++$i}<br />{~else:break;}{~endif}
{~endfor}
<hr />
{//原生php代码;}
<php>
$i=rand(0,1);
switch($i):
case '0': echo '否<br />';break;
case '1': echo '是<br />';break;
endswitch;
</php>
{//夹生饭}
<?php $i=rand(0,1);switch($i):?>
{~case 0:}否<br />{~break;}
{~case 1:}是<br />{~break;}
<?php endswitch;?>
{//半夹生效果;}
{~$i=rand(0,1)}
<php>switch($i):</php>
{~case 0:}否<br />{~break;}
{~case 1:}是<br />{~break;}
<php>endswitch;</php>
最佳答案