Welcome! Log In Create A New Profile

Advanced

How to return all combinations of an array

Posted by John 
John
How to return all combinations of an array
October 05, 2008 02:49AM
Hi All,

I'm hoping someone can help with this. I've got a list of words, for simplicity sake they are:

ABLE BAKER CHARLIE.... there could be more words.

I'm needing to get a list of all combinations of the words such as

ABLE
BAKER
CHARLIE

ABLE
ABLE BAKER
ABLE BAKER CHARLIE
ABLE CHARLIE
ABLE CHARLIE BAKER

BAKER ABLE
BAKER ABLE CHARLIE
BAKER CHARLIE
BAKER CHARLIE ABLE

ETC.

I suppose it's best to put the words into an array... but what then?

Thank You
John



Merijn
Re: How to return all combinations of an array
October 05, 2008 11:47AM
John,

See [en.wikipedia.org]

HTH
John
Re: How to return all combinations of an array
October 05, 2008 02:47PM
THANKS !
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: