Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Split an array into multiple smaller arrays

$
0
0

Hello

Can someone please help with the following. Smile

if I have an array like so

$A = 1,2,3,4,5,6,7,8,9

the number of items in the array could be any number .e.g. the above holds 9 items next time it may be 50 items in he array

 

Lets say I want to split the array $A into a number of smaller Arrays each of which contain 3 items therefore

Array1 would contain 1,2,3

Array2 would contain 4,5,6

Array3 would contain 7,8,9

 

can someone please show me how to achieve this 

 

Thanks

AAnotherUser__

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles