Jump to content

Combinations


dotkpay

Recommended Posts

Hello,

Am looking for a function that generates all possible combinations of strings in an array.

For example if:

$arr[1] = "Hello";

$arr[1] = "how";

$arr[2] = "are";

$arr[3] = "you";

 

When the array is passed through the function you would come up with a list of string combinations line by line like below:

 

Hello

Hello how are you

how Hello are you

how are Hello you

how are you Hello

how

........and so on

 

The list goes on and on.

 

Link to comment
https://forums.phpfreaks.com/topic/247839-combinations/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.