Re: list all constitute group of array ?
| From: | Robert Cummings | Date: | Fri, 13 Feb 2009 23:49:18 +0000 |
| Subject: | Re: list all constitute group of array ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288239@lists.php.net to get a copy of this message | ||
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.interjinn.com
Application and Templating Framework for PHP