Jump to content

need to echo all word combinations from the input


tastro

Recommended Posts

need to echo all word combinations from the input

 

also lets say that someone types "this is my query" into an input fiend and this will be the input.

 

i need the php script to echo all the possible combinations of this string. but there can be 4 words like in the example or 3 or more or less.

 

also it should then echo something like this:

 

this

this is

this is my

this is my query

 

is

is my

is my query

is my query this

 

my

my query

my query this

my query this is

 

query

query this

query this is

query this is my

 

+

 

query is my this

this my query is

 

also all combinations possible, for 1 word, 2 words, ... max. words inputed.

please post the code you already have along with whatever errors you're getting.

 

i don't have 1 yet. i have only 1 on how to do this with only the first 2 words. but don't know how to do it if the word count changes. thanks for the url below, i will take a look right now. ;)

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.