Вы сказали:
соединить два массива в один при этом чтобы сортировка по датам соответсвовала в массиве TASK_ALL task_date_create с массивом DEAL_ONE mess_create
[TASK_ALL] => Array
(
[0] => Array
(
[id] => 122
[order_id] => 258
[order_status] => 1
[order_stage] => 4
[task_status] => 1
[task_title] => отправка сообщения test
[task_text] => <p>text</p>
[task_file_path] => ["pixel.png.jpg"]
[task_date_create] => 2025-07-15 01:36:00
[task_date_close] => 2025-07-18 01:36:00
[account_id_create] => 1
[account_id_close] =>
[account_id_finish] =>
[users_task_ids] => ["1"]
)
[1] => Array
(
[id] => 119
[order_id] => 258
[order_status] => 1
[order_stage] => 0
[task_status] => 1
[task_title] => архив
[task_text] => <p>test</p>
[task_file_path] => ["MAN_SHG_BTL7_P511_TB_TZ_S32_KA_FA_X_H18_DRW_938316_00_000.pdf","MAN_BTL7_P511_TB_Z_T_S32_KA_FA_X_H23_DOK_938312_AA_000.pdf"]
[task_date_create] => 2025-05-20 16:53:00
[task_date_close] => 2025-05-21 16:53:00
[account_id_create] => 1
[account_id_close] =>
[account_id_finish] =>
[users_task_ids] => ["33"]
)
)
............
[DEAL_ONE] => Array
(
[0] => Array
(
[id] => 258
[kp_id] => 20182
[status_deal] => 100
[deal_update] => 2025-07-18 14:37:20
[chat] => 0
[uid_inbox] => 192
[text_post] => <div class="kpcr__to20182...........</div>
[attach_post] => [{"path":"2025\/07\/18\/a8a9b7cf9aa88f63a15b2f448a5b5890","uid":192,"file":"img_0.png","part":1,"encoding":3}]
[from_send] => .....
[account_id_send] => INSIDE
[email_group_id] => .....
[account_create] => 1
[mess_create] => 2025-07-18 14:37:19
[mess_update] =>
[meido] => 1011
[inbox_from] => .....
[status_kp] => 4
[status_create] => 2025-06-26 19:25:07
[status_update] => 2025-07-18 14:37:19
[date_inbox] => 1750955105
[email_org] => .....
[id_inbox] => 23221
[text_subject] => Re: ТЕСТ CRM TL_KP20182
[subject_post] => test TL_KP20182
)
[1] => Array
(
[id] => 258
[kp_id] => 20182
[status_deal] => 100
[deal_update] => 2025-07-18 14:37:20
[chat] => 0
[uid_inbox] => 192
[text_post] => 3162523517<br>..........</small>
[attach_post] => []
[from_send] => .....
[account_id_send] => NOTIF
[email_group_id] => .....
[account_create] => 0
[mess_create] => 2025-07-10 20:13:29
[mess_update] => 2025-07-10 20:13:29
[meido] => 992
[inbox_from] => .....
[status_kp] => 4
[status_create] => 2025-06-26 19:25:07
[status_update] => 2025-07-18 14:37:19
[date_inbox] => 1750955105
[email_org] => .....
[id_inbox] => 23221
[text_subject] => Re: ТЕСТ CRM TL_KP20182
[subject_post] => 3162523517
)
[2] => Array
(
[id] => 258
[kp_id] => 20182
[status_deal] => 100
[deal_update] => 2025-07-18 14:37:20
[chat] => 0
[uid_inbox] => 192
[text_post] => <div class="kpcr__to.........</div>
[attach_post] => []
[from_send] => .....
[account_id_send] => SEND
[email_group_id] => .....
[account_create] => 1
[mess_create] => 2025-07-10 20:13:04
[mess_update] =>
[meido] => 991
[inbox_from] => .....
[status_kp] => 4
[status_create] => 2025-06-26 19:25:07
[status_update] => 2025-07-18 14:37:19
[date_inbox] => 1750955105
[email_org] => .....
[id_inbox] => 23221
[text_subject] => Re: ТЕСТ CRM TL_KP20182
[subject_post] => Re: ТЕСТ CRM tracker test TL_KP20182
)
[3] => Array
(
[id] => 258
[kp_id] => 20182
[status_deal] => 100
[deal_update] => 2025-07-18 14:37:20
[chat] => 1
[uid_inbox] => 207
[text_post] => This is a receipt for the mail you sent to: one<..... ><br />
The original subject is: sub 1 TL_KP20182<br />
This receipt verifies that the message has been displayed on the recipient's computer at 2025-07-10 20:10:54
[attach_post] => []
[from_send] => .....
[account_id_send] => AUTO
[email_group_id] => .....
[account_create] => 0
[mess_create] => 2025-07-10 20:11:15
[mess_update] =>
[meido] => 990
[inbox_from] => .....
[status_kp] => 3
[status_create] => 2025-07-10 20:11:15
[status_update] =>
[date_inbox] => 1752167462
[email_org] => .....
[id_inbox] => 24641
[text_subject] => Read: sub 1 TL_KP20182
[subject_post] =>
)
[4] => Array
(
[id] => 258
[kp_id] => 20182
[status_deal] => 100
[deal_update] => 2025-07-18 14:37:20
[chat] => 1
[uid_inbox] => 192
[text_post] => <html><head></head><body></blockquote>.......</blockquote></div></body></html>
[attach_post] => []
[from_send] => .....
[account_id_send] => USER
[email_group_id] => .....
[account_create] => 1
[mess_create] => 2025-06-26 19:25:07
[mess_update] =>
[meido] => 952
[inbox_from] => .....
[status_kp] => 4
[status_create] => 2025-06-26 19:25:07
[status_update] => 2025-07-18 14:37:19
[date_inbox] => 1750955105
[email_org] => .....
[id_inbox] => 23221
[text_subject] => Re: ТЕСТ CRM TL_KP20182
[subject_post] =>
)
[5] => Array
(
[id] => 258
[kp_id] => 20182
[status_deal] => 100
[deal_update] => 2025-07-18 14:37:20
[chat] => 0
[uid_inbox] => 87396
[text_post] => <div class="kpcr__t.............</div>
[attach_post] => []
[from_send] => .....
[account_id_send] => SEND
[email_group_id] => .....
[account_create] => 1
[mess_create] => 2025-06-26 19:23:40
[mess_update] =>
[meido] => 951
[inbox_from] => .....
[status_kp] => 4
[status_create] => 2025-05-20 16:11:41
[status_update] => 2025-06-26 19:23:40
[date_inbox] => 1747746698
[email_org] => .....
[id_inbox] => 20182
[text_subject] => ТЕСТ CRM
[subject_post] => ТЕСТ CRM TL_KP20182
)
...............