转载:http://www.cnblogs.com/glory-jzx/p/3345685.html If you wan't to use the alternative syntax for switch statements this won't work:switch($variable): ?> case 1: ?>ForumNewspagebreak;?> case 2: ?>break;?> endswitch;?>Instead you have to workaround like this:switch($variable): case 1: ?>ForumNewspagebreak;?> case 2: ?>break;?> endswitch;?>看了半天原来是PHP 的BUG。。。 唉。。。
switch : 和 case 之间是不能有任何输出的。。。 PS : 一个空格也不行。。
you may see the comment in this link ........http://php.net/manual/en/control-structures.alternative-syntax.php
The above introduces the html nested php: switch, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.