I have an array .I want to pass array value to setAttributes()
Pls any one help me out…
I have an array .I want to pass array value to setAttributes()
Pls any one help me out…
if the array is a correctly formatted attribute->value, it should work with:
$model->attributes= $array
If not, or if the attribute are not safe, you can always set all the values one by one:
$model->firstAttribute= $array[1];
$model->secondAttribute= $array[2];
$model->thirdAttribute= $array[3];
Thanks…