Need help in Generating Combinations


Posted on 16th Feb 2014 07:03 pm 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?

No comments posted yet

Your Answer:

Login to answer
242 Like 48 Dislike
Previous forums Next forums
Other forums

Request for tunning the below query
Hi,

Can any one help me on the below query while improving the performance,

Form help: Syntax & Logic
Hello again all,

I'm working on a form and ran into a wall (again) and can't seem to think th

function to return url
Hi,

Can you guys help me giving a function that takes all the contents in a particular field

insert/update functions for mysql, what do you think?
I am working on two really simple functions that automatically generate (and execute) insert and upd

php/mysql auto logout after 2 hour and reset password
Hi all,

This I hope will make sense. I've the following code which when a user logins in, cr

Save data in input fields when they press "BACK BUTTON"
Hi, this is html form: And let's say they get a error "Please enter ur title must be more then

How can i steam a video on my PHP site? (non YouTube)
Basically I have a PHP site and don't want to give page rank to YouTube. I just want to stream a bas

Recognising Revenue daily
Hello.
Has anyone come across daily recognition of deferred income?
We want to implement R

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

Nested (echoed) php running wrong script
Got a problem with a php website I'm creating.

In a nutshell, the first page is entirely html

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash