Here is an array.
$item = array('A', 'B', 'C', 'D');
I want to list all possible orders in this array like:
A
A,B
A,B,C
A,B,C,D
A,C
A,C,D
A,C,B
…
B,A
B,A,C
….
How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The permutations you want to know can be accomplished through this algorithm and applying in a loop for the subsets.
Refer to this question for more info