【发布时间】:2015-06-14 20:06:15
【问题描述】:
我如何解决这个问题。我想访问数组中的变量
class testClass{
public $variable;
public function __construct(){
$this->variable = 3; //assign value to variable
}
public $arr = array(
'index' => $this->variable//here show the error
)
}
【问题讨论】:
-
请发布您遇到的错误