Well, just looking at it I think your first given output is wrong. Shouldn't it be this:
Output: [[1,2,3,4,5,6,7,8],[3,5,6],[3,8],[1,7,8]]It appears that the goal is to start a new array each time the next value is lower than the previous one.
That said, it would help if you would give the desired goal as described to you since I am only guessing at it for now.
In reply to Re: Spliting array into nested sequential arrays
by boftx
in thread Spliting array into nested sequential arrays
by Hameed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |