Hi!
i have a function,
function GetNews(){
$doSet = new DataObjectSet();
$news = DataObject::get("News","");
for($i=0; $i<$news->count(); $i++){
$header = $news->HEADER_;
$summary = $news->$SUMMARY_;
$date = $news->$DAYNEWS_;
$records = array (
'HEADER' => $header,
'SUMMARY' => $summary,
'DATE' => $date
'NUM' => $i+1);
$doSet->push(new ArrayData($records));
}
return $doSet;
}
and when I call the template function GetNew
<% control GetNew %>
$HEADER
-------$NUM
<% end_control %>
only the output value of $NUM. And $HEADER does not return anything, database has data