S
S
Sergey Titov2016-03-01 08:33:53
PHP
Sergey Titov, 2016-03-01 08:33:53

How to merge identical arrays with little change?

The output is this array:
8d5e5b3f6e97b724a743ae42c4a4f430.png
In this case, the 5th and 6th elements are presented, I want such elements to merge in case of complete similarity (with the exception of the zero element, where the date is, they can and should differ).
At the output I want to get something like this:

[5] => Array(
[0] => multi
[1] => 2016-03-06 (дата первого)
[2] => 2016-03-07 (дата последнего)
[3] => 2 (их счетчик, просто берется из любого, т.к. они схожи)
[4] => Array( //идентификаторы самих событий
[0] => 83
[1] => 84
...

ps it doesn't have to be two matches, maybe three and four, etc., it's only important that they go in a row, any ideas? already broke my head +_+

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question