Need help in Generating Combinations

Posted on 16th Feb 2014 by admin

Need help generating all possible combination of names in an array

Lets say i have the following array:

$names = array("jack","john","Adam","Mike");

Now my goal is to find all possible combination of 2 names (first name and second name)

e.g. Jack John , Jack Adam, Jack Mike etc...


So how can I do this with PHP?

Other forums