Answer the question
In order to leave comments, you need to log in
What array should be in $model->load()?
Hello everyone, I just can’t find it on Google - can someone quickly answer?
Why doesn't my array get passed in $model->load()?
This is the array I put in
[
0 => [
'id' => '2'
'type' => '2'
'date' => '12/01/2011'
]
]
Answer the question
In order to leave comments, you need to log in
The key is the name of the model class.
[
'ИмяКласса' => [
'id' => '2'
'type' => '2'
'date' => '12/01/2011'
]
]
$data = [
'id' => '2'
'type' => '2'
'date' => '12/01/2011'
];
// второй параметр - пустая строка
$model->load($data, '');
$data = [
'мой ключ' => [
'id' => '2'
'type' => '2'
'date' => '12/01/2011'
]
];
$model->load($data, 'мой ключ');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question