cartesian-product
cartesian-product copied to clipboard
Certain amount from each array
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.