I need to obtain a progressive word combination of a string.
E.g. “this is string”
Output: “this is string”
“this is”
“this string”
“is string”
“this”
“is”
“string”
Do you know similar algorithm? (I need it in php language)
Thanks 😉
This is a simple code solution to your problem.
I concatenate each string recoursively to the remaining ones in the array.