Hi there, I am trying to divide a single array into multiple arrays using a $variable. The $variable is the number of fields / columns in my db table.
For example, if $variable = 3...
Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => 5
[5] => 6
[6] => 7
[7] => 8
[8] => 9
[9] => 10
[10] => 11
[11] => 12
)
Would become...
Array1
(
[0] => 1
[1] => 4
[2] => 7
[3] => 10
)
Array2
(
[0] => 2
[1] => 5
[2] => 8
[3] => 11
)
Array3
(
[0] => 3
[1] => 6
[2] => 9
[3] => 12
)
If someone knows of an easy way to do this would be of great help.
Thanks