I have an array :
$names = array("Jim", "Jane", "Bob", "Susan", "Ralph");
And I want to have calculate combinations for 3 elements.
The output is something like that:
Jim, Jane, Bob
Jim, Jane, Susan
Jim, Jane, Ralph
Jim, Bob, Susan
Jim, Bob, Ralph
Jim, Susan, Ralph
Jane, Bob, Susan
Jane, Bob, Ralph
Jane, Susan, Ralph
Bob, Susan, Ralph
The expected output has 10 different combinations. I have been thinking how to achieve this but have no idea how to do this. Please help, thanks.