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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to