Answer the question
In order to leave comments, you need to log in
How to save, update a model with a multidimensional array?
Good afternoon,
until I understand how to save my model where is a multidimensional array.
Here comes to me such an array.
[
0 => [
1 => [
0 => app\models\User#1
(
[yii\db\BaseActiveRecord:_attributes] => [
'id' => '148'
'created' => '2015-04-21 10:42:27'
'modified' => '2015-05-21 08:28:25'
'number' => '2347777awsdas12345'
'is_active' => 0
]
[yii\db\BaseActiveRecord:_oldAttributes] => [
'id' => '148'
'created' => '2015-04-21 10:42:27'
'modified' => '2015-05-21 08:28:25'
'number' => '7777awsdas12345'
'is_active' => 1
]
[yii\db\BaseActiveRecord:_related] => []
[yii\base\Model:_errors] => null
[yii\base\Model:_validators] => null
[yii\base\Model:_scenario] => 'default'
[yii\base\Component:_events] => []
[yii\base\Component:_behaviors] => []
)
]
2 => [
1 => app\models\User#2
(
[yii\db\BaseActiveRecord:_attributes] => [
'id' => '149'
'created' => '2015-11-30 03:24:39'
'modified' => '2015-11-30 03:24:39'
'number' => 'sadsad1231231233'
'is_active' => 0
]
[yii\db\BaseActiveRecord:_oldAttributes] => [
'id' => '149'
'created' => '2015-11-30 03:24:39'
'modified' => '2015-11-30 03:24:39'
'number' => '1231231233'
'is_active' => 1
]
[yii\db\BaseActiveRecord:_related] => []
[yii\base\Model:_errors] => null
[yii\base\Model:_validators] => null
[yii\base\Model:_scenario] => 'default'
[yii\base\Component:_events] => []
[yii\base\Component:_behaviors] => []
)
]
]
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question