Really it's complicated situation for me right now.
Here I have to export multidimensional array data into excel which is looks like below image, but I'm unable to make it possible.
Please help me to export the multidimensional array data to export in excel.
I have an array from relational query like:
$array = [
0 => [
'name' => 'Devat Karetha',
],
1 => [
'name' => 'John Doe',
'schools' => [
0 => [
'school_name' => 'ABC School',
'school_address' => 'ABC Address',
],
1 => [
'school_name' => 'XYZ School',
'school_address' => 'XYZ Address',
]
],
'sports' => [
0 => [
'id' => 8,
'sport_type' => [
'id' => 2
'sport_type_name' => 'ABC Sport'
],
],
1 => [
'id' => 8,
'sport_type' => [
'id' => 3
'sport_type_name' => 'ABC Sport'
],
],
],
],
2 => [
'name' => 'Utkarsh Raval',
'schools' => [],
'sports' => [
0 => [
'id' => 8,
'sport_type' => [
'id' => 2
'sport_type_name' => 'DEKTS Sport'
],
],
],
'centre' => [
0 => [
'id' => 4,
'centre_name' => 'ABC Centre',
'centre_mobile' => '9898989898',
],
1 => [
'id' => 5,
'centre_name' => 'XYZ Centre',
'centre_mobile' => '7878787878',
],
]
],
];
Thank You...:)
