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

how to configure ADS in ABAP instance
Hi All,

I am working on r/3 4.7 ABAP system.Can we configure ADS(adobe document services)

PHP mail() with images
I'm trying to get images to send along with my HTML e-mail sent through PHP mail(). I only tried vie

mysql UNION | warning mysql_fetch_array !!
Code: <?php
$i = 0;
$query1="SELECT * FROM `products` WHERE `div

Batch Related Pricing
Hi, I need some clarity on the batch related pricing

For example the following are the b

Stuck with preg_replace
Hi,

I'm trying to use preg_replace to remove part of the IP address submitted using a form on

Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of a

frame help
on the bottom frame is menu.html

Code: <body><form action='link.php' met

Question about GD library
I am trying to make an image that shows a random quote from my database.


However I want t

Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor

JQuery, Masterpage, and Control issue
Hey everyone, I am using JQuery in several sites so I thought it would be best to place the library

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