PHP 中关于switch语句的疑问
我写了一个PHP文件如下:
<?php
$id="onload";
switch($id) {
case "onload":
idm_Onload();
case "end":
idm_end($name);
break;
}
function idm_Onload() {
echo 'this is onload';
}
function idm_end($name) {
echo 'this is the end';
}
?>
但是用IE访问的结果却是:
this is onloadthis is the end
怎么switch下的case都执行了呢?
为什么????????