return $this;
}
public function get_head(){
return $this->head_html;
}
}
改了紅色部份
--
以惡治惡
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.56.138.224
怎不分開寫?
不知道以下這樣寫是不是你要的,
不過我個人不喜歡就是了...
class grid {
private $head_data; //標題列的資料
private $rows_data; //資料列的資料
public $head_html;
public $body_html;
public function create_grid($heads, $bodys){
$this->head_html = $heads;
$this->body_html = $bodys;
$html = $heads.$bodys;