I'd like to tranform a php array in another array. More than words, let me show you the input array and the desired output array I wish. If somebody can tell me how I should realized this - no need to have full script, just ideas - I would be thankful.
input :
Array (
[0] => Array
(
[0] => A
[1] => 2023-11-14T16:30:00+0100
[2] => 2023-11-14T18:00:00+0100
)
[1] => Array
(
[0] => A
[1] => 2023-11-16T16:00:00+0100
[2] => 2023-11-16T17:00:00+0100
)
[2] => Array
(
[0] => B
[1] => 2023-11-20T09:30:00+0100
[2] => 2023-11-20T10:00:00+0100
)
[3] => Array
(
[0] => B
[1] => 2023-11-21T09:00:00+0100
[2] => 2023-11-21T10:00:00+0100
) )
output desired:
Array
(
[0] => Array
(
[0] => 0,"A","2023-11-14T16:30:00+0100","2023-11-14T18:00:00+0100","2023-11-16T16:00:00+0100","2023-11-16T17:00:00+0100"
)
[1] => Array
(
[0] => 1,"B","2023-11-20T09:30:00+0100","2023-11-20T10:00:00+0100","2023-11-21T09:00:00+0100","2023-11-21T10:00:00+0100"
)
)