在類的方法中 用 數(shù)組 作為 參數(shù), 在方法中 返回 數(shù)組這個參數(shù)
想問一下怎么去實現(xiàn)呢?
比如
class GetArr{
public $arr = new array();
function __construct('數(shù)組A'){
? '假如這里遍歷了一個文件夾,我把它放在一個數(shù)組B里了'
????$A[] = $B;
????}
}
$ga = new GetArr($this->arr);
想問一下怎么去實現(xiàn)呢?
比如
class GetArr{
public $arr = new array();
function __construct('數(shù)組A'){
? '假如這里遍歷了一個文件夾,我把它放在一個數(shù)組B里了'
????$A[] = $B;
????}
}
$ga = new GetArr($this->arr);
2016-01-23
舉報
2016-01-23
應該不行吧 $arr =new array()是類的一個屬性 ?屬性怎么能返回呢??