Hello.
Partially advanced in solving their own problems. Now it makes sense to rephrase the question:
there is an array of three elements: $arr = array("a","b","c")
How is it possible to generate from it unique child arrays with two elements in each?
for a given example, this is:
$arr_1 = array("a", "b"); $arr_2 = array("a", "c"); $arr_3 = array("b", "c");
and
How is it possible to sort an array with three elements reaching all six possible sequences of elements?
for a given example, this is:
$arr_1 = array("a","b","c"); * $arr_2 = array("a","c","b"); $arr_3 = array("b","a","c"); $arr_4 = array("b","c","a"); $arr_5 = array("c","a","b"); $arr_6 = array("c","b","a"); *
* getting the source and reverse arrays is not difficult. question in the other four options.
Maybe someone can suggest which way to dig?
There is no need to write a listing, I just need help in drawing up the algorithm.