I am using php. I have a multidimentional array, time sorted, created array_merge() from other arrays, created from multiple MySql databases. The aim is to create an activity log. It all works but I have multiple entries saying;
X uploaded image awhich is quite correct but wastefull of space.
X uploaded image b
Array
(
[3] => Array
(
[time] => 1500218082
[user] => James
[desc] => James posted to forum a_hippo
)
[0] => Array
(
[time] => 1499294355
[user] => Tom
[desc] => Tom edited a wiki page a_tree
)
[1] => Array
(
[time] => 1498939657
[user] => Bob
[desc] => Bob uploaded image a_badger
)
[2] => Array
(
[time] => 1498939656
[user] => Bob
[desc] => Bob uploaded image a_rabbit
)
)
What I would like to do is roll up key [1] and [2] so [desc] says bob uploaded image a_badger & a_rabbit. My research has uncovered "array_unique" but I dont want to remove completely. and How to detect duplicate values in PHP array?
Can anyone help? Thanks Chris