Code:
foreach($imageList->items as $ubmodel){
$program = ProgramModel::findfirst($ubmodel->pid);
$topic = TopicModel::findfirst($ubmodel->tid);
$ubmodel->program=$program->title;
$ubmodel->topic=$topic->title;
print_r($ubmodel->toarray());
$result[]=$ubmodel;
}
the output result doesn't have 'program' and 'topic' parameters, but I am sure $program->title and $topic->title have content. my php version is :PHP Version 5.5.9-1ubuntu4.5
Someone have same problem like this? and how to fix it?