Re: word matrix
| From: | Mike Dunlop | Date: | Tue, 28 Mar 2006 19:35:30 +0000 |
| Subject: | Re: word matrix | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232754@lists.php.net to get a copy of this message | ||
Sure Chris.
$words = array("word1","word2","word3");
I want this:
$result = array(
"word1",
"word2",
"word3",
"word1 word2",
"word1 word3",
"word2 word1",
"word2 word3",
"word3 word1",
"word3 word2",
"word1,word2,word3"
);
Thanks - MD
On Mar 27, 2006, at 5:55 PM, Chris wrote:
Mike Dunlop wrote:i have an array of various words and am looking to create a result array of every possible combination of words from the orig array. I'm not sure how to accomplish this elegantly within a for loop. Anyone have any ideas?Could you post a sample of what you have and what you want to end up with? It'll be easier for us to work out rather than guess at what you're trying to do. --Postgresql & php tutorials http://www.designmagick.com/ --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php