Using the example below, how can I remove all duplicate top level array elements that meet the following criteria:
- same TicketID_xxxxx and Ticket_Reply_xxxxx numbers (where xxxxx is the number)
- also have matching timestamps?
Edits for additional info:
- I will always need to remove the sub-array with TicketID_xxxxx while keeping the sub-array with Ticket_Reply_xxxxx
Starting array:
Array
(
[0] => Array
(
[0] => 2018-03-03 07:43:15
[1] => TicketID_25500
)
[1] => Array
(
[0] => 2018-03-03 08:00:00 //matching timestamp
[1] => TicketID_25500
)
[2] => Array
(
[0] => 2018-03-03 08:00:00 //matching timestamp
[1] => Ticket_Reply_25500
)
}
Desired Result:
Array
(
[0] => Array
(
[0] => 2018-03-03 07:43:15
[1] => TicketID_25500
)
[1] => Array
(
[0] => 2018-03-03 08:00:00
[1] => Ticket_Reply_25500
)
}