开发者

Get all combinations of array

Merged with Cartesian Product of开发者_Go百科 N arrays.

I need to get all combinations of array.

Example:


array
                (
                    array("a","b"),               
                    array("1","2","3","4")                
                );

And i need to get

array
                (
                    array("a","1"),               
                    array("a","2"),               
                    array("a","3"),               
                    array("a","4"),               
                    array("b","1"),               
                    array("b","2"),               
                    array("b","3"),               
                    array("b","4"),               
                );

Of course it must work when sizeof($array) >= 2.

Thanks much

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜