Y
Y
YourQuestion2015-01-09 01:41:22
PHP
YourQuestion, 2015-01-09 01:41:22

How to get all combinations of elements of an array with a size of at least and at most N characters?

We have an array:
$arr = array('a','b','c','d','e','f','g');
Tell me how to get all possible combinations of array elements with a size of at least and no more than 4 characters?
PS: for example, bcda, acdg etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Nalomenko, 2015-01-09
@nalomenko

Here is the solution to your problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question