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:

Did you know?Explore Trending and Topic pages for more stories like this.
$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

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

Creating Images from images in PHP
Okay well I am trying to make a 'dynamic' calender image with PHP.

I have images like this:

Material xxx does not exist in plant xxx
Dear All,

I am working for a steel project which is repetitive manufacturing.

displaying unknown amount of results
I am reading a directory and getting a list of folders in the directory, I want to display the folde

how to transport the Query and insfoset
Hi

I have created the query using SQ01........
How to created T-code for query..

session checking in page load
hai all I have a web site is www.Mryas.com in this my login page is Page1.aspx its co

PHP and Javascript
Hi Guys,

Im trying to load the contents of an html file into a text area for editing, this is

Error: SQL Syntax; Line 1
Code:

<?php require "global_settings.php"; ?>
<title&g

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

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