I have an array with film information and the times when they will be shown in the cinema. each showing is another result, so one film can be in the array multiple times. I want to combine duplicate film entries into one and put all shows in another dimension in the new array. The formatting is this:
Array (
[title] => title
[synopsis] => synopsis
[poster] => poster
[cast] => cast
[director] => director
[length] => length
[rating] => rating
[datetime] => datetime )
Should be formatted into:
Array (
[title] => title
[synopsis] => synopsis
[poster] => poster
[cast] => cast
[director] => director
[length] => length
[rating] => rating
[datetime] => Array
( [0] => datetime0
[1] => datetime1
... )
)
Has anyone an idea how to combine it after "title" and put all entries for datetime in a new dimension. Thank for your help!