Level 63
This will help you.
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have 3 arrays
[
58814 => array:4 [
"2022-09-16" => array:5 [
"forecast_date" => "2022-09-16"
"venue_id" => "58814"
"statistics_group_code" => "58814"
"forecast_last_year_actual" => 36288000
"forecast_this_year_plan" => 28000000
]
"Total" => array:5 [
"forecast_date" => "Total"
"venue_id" => "58814"
"statistics_group_code" => "58814"
"forecast_last_year_actual" => 105924000
"forecast_this_year_plan" => 100000000
]
]
]
The second
[
58814 => array:4 [
"2022-09-16" => array:10 [
"order_date" => "2022-09-16"
"event_name" => "Kansai"
"statistics_group_code" => "58814"
"total_revenue_virtual_catalog" => 0
"total_revenue_sales_act_ttl" => 58530700
"units_total_of_trunk_show" => 505
"orders_total_of_trunk_show" => 194
"total_revenue_event_venue" => 42712000
"total_revenue_online_selling" => 4003000
"total_revenue_other" => 11815700
]
"Total" => array:10 [
"order_date" => "Total"
"event_name" => "Kansai"
"statistics_group_code" => "58814"
"total_revenue_virtual_catalog" => 0
"total_revenue_sales_act_ttl" => 130658600
"units_total_of_trunk_show" => 1284
"orders_total_of_trunk_show" => 453
"total_revenue_event_venue" => 100703000
"total_revenue_online_selling" => 13066000
"total_revenue_other" => 16889600
]
]
The third
[
58814 => array:4 [
"2022-09-16" => array:6 [
"appointment_date" => "2022-09-16"
"total_forecast" => 35489000
"total_appointments" => 170
"total_arrived_appointments" => 143
"total_arrived_attendance" => 205
"total_number_of_attendees" => 239
]
"Total" => array:6 [
"appointment_date" => "Total"
"total_forecast" => 85639000.0
"total_appointments" => 455
"total_arrived_appointments" => 402
"total_arrived_attendance" => 701
"total_number_of_attendees" => 778
]
]
Output
[
58814 => array:4 [
"2022-09-16" => array:5 [
"order_date" => "2022-09-16"
"event_name" => "Kansai"
"statistics_group_code" => "58814"
"total_revenue_virtual_catalog" => 0
"total_revenue_sales_act_ttl" => 58530700
"units_total_of_trunk_show" => 505
"orders_total_of_trunk_show" => 194
"total_revenue_event_venue" => 42712000
"total_revenue_online_selling" => 4003000
"total_revenue_other" => 11815700
"forecast_date" => "2022-09-16"
"venue_id" => "58814"
"statistics_group_code" => "58814"
"forecast_last_year_actual" => 36288000
"forecast_this_year_plan" => 28000000
]
"Total" => array:5 [
"order_date" => "Total"
"event_name" => "Kansai"
"statistics_group_code" => "58814"
"total_revenue_virtual_catalog" => 0
"total_revenue_sales_act_ttl" => 130658600
"units_total_of_trunk_show" => 1284
"orders_total_of_trunk_show" => 453
"total_revenue_event_venue" => 100703000
"total_revenue_online_selling" => 13066000
"total_revenue_other" => 16889600
"forecast_date" => "Total"
"venue_id" => "58814"
"statistics_group_code" => "58814"
"forecast_last_year_actual" => 105924000
"forecast_this_year_plan" => 100000000
]
]
]
I would like to merge 3 arrays to push all the objects from the other array to become an array by time. Please help me. Thank guys
Please or to participate in this conversation.