function newLinks($a,$b,$c,$d,$e,&$links) {
switch ($a) {
case '00':
$links = "Under Process";
return true;
break;
case '01':
$links = "Processed";
return true;
break;
case '10':
$links = "Deleted. Under Process";
return true;
break;
case '11':
$links = "Deleted. Processed";
return true;
break;
default:
return false;
}
}
return true 后需要 break 吗?
因为我做了这样的事情:
if ( newLinks($a,$b,$c,$d,$e,$links) ) {
echo $links;
} else {
echo 'Failed';
}