I want to merge an array like first element to an object like second element.
Is it possible to merge a php object and a php array? If so, How do I merge these?
I have snipped via print_r
First Element (array)
Array
(
[start_date] => 2014-12-28
)
Second Element (object)
Bannerlookup Object
(
[_new:CActiveRecord:private] =>
[_attributes:CActiveRecord:private] => Array
(
[id] => 1
[name] => First Banner
[description] => My first banner description goes here
[type] => 1
[position] => 1
[price] => 20
[status] => 1
)
[_related:CActiveRecord:private] => Array
(
)
[_c:CActiveRecord:private] =>
[_pk:CActiveRecord:private] => 1
[_alias:CActiveRecord:private] => t
[_errors:CModel:private] => Array
(
)
[_validators:CModel:private] =>
[_scenario:CModel:private] => update
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
Thanks in advance :)