cartesian-product icon indicating copy to clipboard operation
cartesian-product copied to clipboard

Certain amount from each array

Open aiso-net opened this issue 2 years ago • 0 comments

Hello, Can you library do this? $data = [ 'hair' => [ 'blond', 'red', ], 'eyes' => [ 'blue', 'green', 'brown', ], 'gender' => [ 'male', 'female', ] ];

Generate all combinations based on pick any 1 item from hair, pick any 2 items from eyes and any 1 item from gender. And where it can be any number of item arrays and any number of items in the item array, and I can pass as second option how many items to choose from from each item array.

aiso-net avatar Aug 22 '22 17:08 aiso-net