Hi, this question doesn't relate to Laravel directly so I apologize in advance.
Suppose I have an array like this -
Array
(
[0] => 21,"Monipur","[email protected]",466464564,Admin,1,"Monipur","Terry","[email protected]",466464564,School,"Dhaka",1213","Dhaka"
[1] => 25,"Monipur High","terry123@gmail.com",78997895,Admin,1,"Monipur High","Terry","terry123@gmail.com",78997895,School,"Dhaka",1213","Dhaka"
[2] => 26,"Monipur High","[email protected]",78456644,Admin,1,"Monipur High","Terry","[email protected]",78456644,School,"Dhaka",1212","Dhaka"
[3] => 27,"Monipur High","[email protected]",4546464456,Admin,1,"Monipur High","Harry","[email protected]",4546464456,School,"Dhaka",1212","Mirpur"
[4] => 30,"Hello High","[email protected]",54464464,Admin,1,"Hello High","Hello","[email protected]",54464464,School,"Dhaka",1211","Dhanmondi"
[5] => 32,"Bengali School","[email protected]",789756465654,Admin,1,"Bengali School","Tazin","[email protected]",789756465654,School,"Dhaka",1213","Mirpur"
)
As you can see the values in the array are comma separated and doesn't have any key themselves. But I need to print this list within a html table. So I need to separate each index into a separate array like so -
Array
(
[0] => 21
[1] => "Monipur"
[2] => "[email protected]"
[3] => 466464564
[4] => Admin
[5] => 1
[6] => "Monipur"
[7] => "Terry"
[8] => "[email protected]"
[9] => 466464564
[10] => School
[11] => "Dhaka"
[12] => 1213"
[13] => "Dhaka"
)
I can extract the values into an array for single index but I'm not sure how to do this for all the indexes in the array. In other words, I'm stuck with the loop for this procedure. I'm sure it's easy but I'm just not getting it. Please help. TIA.