Do you want exactly that list or simply all the possible combinations?
If you want all possible combinations, search for a permute or permutation
function in php...
Does sound like homework lol. :-)
Regards,
Tim
Tim-Hinnerk Heuer
http://www.ihostnz.com
Alanis Morissette - "We'll love you just
Shawn McKenzie wrote:
> Robert Cummings wrote:
>> On Sat, 2009-02-14 at 07:41 +0800, LKSunny wrote:
>>> >> $a = array("a", "b", "c", "d");
>>>
>>> /*
>>> how to list:
>>> abcd
>>> abc
>>> ab
>>> ac
>>> ad
>>> bcd
>>> bc
>>> bd
>>> cd
>>> a
>>> b
>>> c
>>> d
>>>
>>> who have idea ? thank you very mu
Robert Cummings wrote:
> On Sat, 2009-02-14 at 07:41 +0800, LKSunny wrote:
>> > $a = array("a", "b", "c", "d");
>>
>> /*
>> how to list:
>> abcd
>> abc
>> ab
>> ac
>> ad
>> bcd
>> bc
>> bd
>> cd
>> a
>> b
>> c
>> d
>>
>> who have idea ? thank you very much !!
>> */
>> ?>
>
> This looks like homewo
On Sat, 2009-02-14 at 07:41 +0800, LKSunny wrote:
> $a = array("a", "b", "c", "d");
>
> /*
> how to list:
> abcd
> abc
> ab
> ac
> ad
> bcd
> bc
> bd
> cd
> a
> b
> c
> d
>
> who have idea ? thank you very much !!
> */
> ?>
This looks like homework. Use recursion.
Cheers,
Rob.
--
http://www.i
4 matches
Mail list logo