two or more different collected data in one CGridView

Comparing #1 with #2

Revision #2 was created by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz) on Nov 9, 2013, 6:39:22 PM.

-

Content

Assume that you have teachers and students model.
 
 
 
```php 
teacher model has: person_id,id_teacher,name,surname,bachelor,master,etc student model has: person_id,id_student,name,surname, age, apartment ```
 
 
(person_id is a global id both of teachers and students) Now we want an CArrayProvider like that PERSONS DETAILS
[...]
}

//
from merge withe second data collection
$test = 0;
foreach ($t2 as $v) {
$res[$v->person_id] = array_merge(isset($res[$v->person_id]) ? $res[$v->person_id] : array(), $v->attributes);
}
[...]