PHP algorithm to generate all combinations of a specific size from a single set PHP algorithm to generate all combinations of a specific size from a single set php php