class bbsObj{
var $num;
var $dates;
var $title;
var $counts;
function bbsObj($num, $datas, $title, $counts) {
$this->num = $num;
$this->dates = $num;
$this->title = $title;
$this->counts = $counts;
}
function getNum(){
return $this->num;
}
function getDates(){
return $this->dates;
}
}
$bbsObject = new bbsObj("1", "2012", "title", "0");
$data = array();
$data[0] = $bbsObject;
echo($data[0]->getNum());
is there any way to express arraylist < class > type in php?
I believe echo should returns "1" but dont know why it returns nothing and shows nothing.
why am I getting nothing when I echoing?