php - Get all combinations of array -


i need combinations of array.

example:


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

and need

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 must work when sizeof($array) >= 2.

thanks much


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -