PHP 用switch return 返回值有关问题
Jun 13, 2016 pm 12:32 PM
PHP 用switch return 返回值问题
public function banben(){
$this->load->library('LibUser');
$cc ;
switch ($this->libuser->getUserType()){
case 1:
$cc = $this->libuser->version("a");
break;
case 2:
$cc = $this->libuser->version("b");
case 6:
$cc = $this->libuser->version("c");
break;
default:
$cc = "没有数据";
break;
}
return $cc;
}
----------------------------------------------------
前提我不想用ifelse ,用switch 能不能 return 回去呢?大虾 出来

熱門文章

熱門文章

熱門文章標籤

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

OOBELANGUAGE錯誤Windows 11 / 10修復中出現問題的問題
