I have an array like the following:
array(2) {
[0]=> string(15) "University Core"
[1]=> array(4) {
[0]=> array(3) {
[1]=> string(8) "Language"
[3]=> string(2) "12"
[2]=> array(5) { [0]=> string(6) "ENG102" [1]=> string(6) "ENG111" }
}
[1]=> array(3) {
[1]=> string(10) "Humanities"
[3]=> string(1) "9"
[2]=> array(4) { [0]=> string(6) "PHI104" } }
[2]=> array(3) {
[1]=> string(15) "Social Sciences"
[3]=> string(1) "9"
[2]=> array(8) { [0]=> string(6) "ECO101" [1]=> string(6) "ECO104" } }
[3]=> array(3) {
[1]=> string(7) "Science"
[3]=> string(1) "4"
[2]=> array(2) { [0]=> string(6) "BIO103" [1]=> string(7) "BIO103L" } } }
}
This will be sent to view.
Where it should be shown like this
------------------------------------------------------------------
category | sub category | courselist
------------------------------------------------------------------
| Language |ENG102
| |-------------------------
| | ENG111
University Core |--------------------------------------------------
|Humanities |
| |PHI104
|--------------------------------------------------
I find it very complex and really dont know how to do it.
Any suggestion on how to do it.?
After searching I got that ,I need to use rowspan and colspan . But this array is complex, so I need help.
So far what i have tried, is not even close to the solution . Thats why i didnt show it here.