i have an array of std class $fee_str and an another std class $total_amount. I want to marge both array to get one another std class object.
Array
(
[0] => stdClass Object
(
[class] => 1
)
[1] => stdClass Object
(
[class] => 10
)
)
Array
(
[0] => stdClass Object
(
[fee_amount] => 8285
)
[1] => stdClass Object
(
[fee_amount] => 300
)
)
$fee_str=$this->fee_settings_model->load_fee_structure();
$i=0;
foreach ($fee_str as $key => $classes) {
$total_amount[$i]=$this->fee_settings_model->get_total_by_class($classes->class);
$i++;
}
$data=array_merge($fee_str,$total_amount);
echo "<pre>";
print_r($data);
exit;
i want to get results like this
Array
(
[0] => stdClass Object
(
[class] => 1
[fee_amount] => 8285
)
[1] => stdClass Object
(
[class] => 10
[fee_amount] => 300
)
)