-1
У меня есть 3 запросовОбъединение 3 массивов в один
$this->db->select('count(id) as Lead_Current_Month')->from('admin_lead_distribution');
$result1=$this->db->get()->result();
$this->db->select('count(id) as Lead_Current_Month')->from('level1_lead_distribution');
$result2=$this->db->get()->result();
$this->db->select('count(id) as Lead_Current_Month')->from('level2_lead_distribution');
$result3=$this->db->get()->result();
Когда я печатаю это дает
Array
(
[0] => stdClass Object
(
[Lead_Current_Month] => 12
)
)
Array
(
[0] => stdClass Object
(
[Lead_Current_Month] => 38
)
)
Array
(
[0] => stdClass Object
(
[Lead_Current_Month] => 10
)
)
Как совместить 3 массивов в один? Я хочу, чтобы результат:
Array
(
[0] => stdClass Object
(
[Lead_Current_Month] => 60
)
)
[Lead_Current_Month] => 60 (60 является суммой всех значений 3 массива)