List all possible 2 letter combinations of 8 letters
| From: | Ben Weinberger | Date: | Mon, 20 Nov 2000 18:24:26 +0000 |
| Subject: | List all possible 2 letter combinations of 8 letters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26305@lists.php.net to get a copy of this message | ||
Hi~
I'm trying to write a script that will list all 2 letter combinations of given number of letters. For example, let's say I entered 8 letters "a, b, c, d, e, f, g, h". I want the script to spit out all 2 letter combinations-- i.e. ab, ac, ad, ae, etc.... Also, the script should make sure it doesn't repeat any combinations-- I really have no idea where to start on this one-- the only thing I know is that it will most likely be within some sort of for/while loop... can someone help?
Thanks,
-Ben