对多个数组进展组合讨论

WBOY
Release: 2016-06-13 11:34:38
Original
864 people have browsed it

对多个数组进行组合讨论
假设有三个数组(实际不确定多少个数组):
$arr1 = array(1, 2, 3, 4);
$arr2 = array(10, 20, 30, 40);
$arr3 = array(100, 200, 300, 400);

要实现的结果:
array(
    array(1,10,100),
    array(1,10,200),
    array(1,10,300),
    array(1,10,400),
    array(1,20,100),
    array(1,20,200),
    array(1,20,300),
    array(1,20,400),
    array(1,30,100),
    ...
);
不想用递归,但是也可以实现看看

排列组合
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!