PHP Possible combinations 3 arrays of 2 values [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: PHP take all combinations I'm thinking of making something in PHP that will show me all combinations of license plates. For example: You have 3 boxes you can fill in max 2 values Like BOX1 BOX2 BOX3 75 PM M5 7S PH MS Z5 PN H5 ZS RM HS 25 RH N5 2S RN NS NOT BOX1+BOX1+BOX1 It needs to show me ex. 75-PM-M5 ex. 75-PH-MS ex. 75-PN-MS ex. 75-PM-H5 ex. 75-PH-H5 ex. 75-PN-H5 So, BOX1+BOX2+BOX3 The PHP script needs to