象if 语句一样,你可以为用大括号把多个语句构成一组。 or by using the alternate syntax:
while (expr): statement ... endwhile;
下面两个例了是一样的,都输出1 到 10:
/* example 1 */$i = 1;while ($i <= 10) { print $i++;/* the printed value would be$i before the increment(post-increment) */}/* example 2 */$i = 1;while ($i <= 10): print $i; $i++;endwhile;