I'm using CakePHP 3.6. I have this Array and I want to group this array by season and an episode like this $data["season"]["episode"]; how can I achieve this considering $data has about 1000 index;
i know about Hash::combine() ;
but it's just for one level as far as I understand.
thanks
$data = [
[
"episode" => "01" ,
"season" => "01" ,
"name" => "first" ,
"...." => "......." ,
] ,
[
"episode" => "01" ,
"season" => "01" ,
"name" => "second" ,
"...." => "......." ,
] ,
[
"episode" => "03" ,
"season" => "01" ,
"name" => "third" ,
"...." => "......." ,
] ,
[
"episode" => "01" ,
"season" => "02" ,
"name" => "......." ,
"...." => "......." ,
] ,
];