Пожалуйста, проверьте ниже мой массив
yii \ data \ ActiveDataProvider Object
(
[_models: yii \ data \ BaseDataProvider: private] => Массив
(
[0] => app \ modules \ student \ models \ StuMaster Object
(
[report_batch_id] =>
[report_section_id] =>
[report_city] =>
[importFile] =>
[report_subject] =>
[fee_paid] =>
[aecc_subject] =>
[fixed_subject] =>
[choice_subject] =>
[ge_subject] =>
[core3_subject] =>
[_attributes: yii \ db \ BaseActiveRecord: private] => Массив
(
[stu_master_id] => 3652
[stu_master_stu_info_id] => 5718
[stu_master_user_id] => 4724
[stu_master_nationality_id] => 1
[stu_master_category_id] => 7
[stu_master_course_id] => 10
[stu_master_batch_id] => 20
[stu_master_section_id] => 29
[stu_master_semester_id] => 24
[stu_master_stu_status_id] => 4
[stu_master_stu_address_id] => 4522
[stu_college_rollno] =>
[creat_at] => 2018-07-10 20:32:33
[creation_by] => 1
[updated_at] => 2018-07-10 20:42:27
[updated_by] => 1
[is_status] => 0
[stu_on_hold_details] => 1
)
[_oldAttributes:yii\db\BaseActiveRecord:private] => Array
(
[stu_master_id] => 3652
[stu_master_stu_info_id] => 5718
[stu_master_user_id] => 4724
[stu_master_nationality_id] => 1
[stu_master_category_id] => 7
[stu_master_course_id] => 10
[stu_master_batch_id] => 20
[stu_master_section_id] => 29
[stu_master_semester_id] => 24
[stu_master_stu_status_id] => 4
[stu_master_stu_address_id] => 4522
[stu_college_rollno] =>
[created_at] => 2018-07-10 20:32:33
[created_by] => 1
[updated_at] => 2018-07-10 20:42:27
[updated_by] => 1
[is_status] => 0
[stu_on_hold_details] => 1
)
[_related:yii\db\BaseActiveRecord:private] => Array
(
[stuMasterStuInfo] => app\modules\student\models\StuInfo Object
(
[stu_master_category_id] =>
[_attributes:yii\db\BaseActiveRecord:private] => Array
(
[stu_info_id] => 5718
[stu_unique_id] => 4522
[stu_title] => Mr.
Я хочу получить данные stuMasterStuInfo
И я использую это
foreach ($ модель как $ val) {
foreach ($ val-> models как $ value) {
если я применяю «выход»; в конце внутреннего цикла все работает нормально, но если я уберу «выход»; он возвращает меня, пытаясь получить свойство необъекта
Спасибо АК