PHP 提供了一些流程控制的替代語法,包括 if,while,for,foreach 和switch。替代語法的基本形式是把左花括號({)換成冒號(:),把右花括號(})分別換成 endif;,endwhile;,endfor;,endforeach; 以及endswitch;。 <?php if ($a == 5): ?>A is equal to 5<?php endif; ?> 在...
www.dbjr.com.cn/shouce/php5/zh/control-... 2025-3-27