4
I have an array in this format:
meuArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ...];
I would like to turn it into a multidimensional array with javascript/jquery leaving it so:
meuArray = [
[0] => ["0", "1", "2", "3", "4"];
[1] => ["5", "6", "7", "8", "9"];
...
]
The number of keys per array will vary, but for ease of response, we can always consider 5 keys per array.
Because it can vary, then the rule should be better explained, what is the true rule of creating multiple arrays from one?
– novic
The cut will be made according to the amount of results that fit in user resolution, if it is 5 I will cut 5 in 5 and create a line with these 5 and so on
– Leo Letto
If the item number is 6 as it is divided?
– novic
That’s what I want to know, if it’s 6 by 6, I’m going to upgrade the division inside the sucess and pass the loop that someone will answer me, I’m going to test with the current answers to see if I can get what I want.
– Leo Letto