what i want to do is that i am creating php array dynamic .i dont know about the elements in the array. lets say i have array like this
$mix_array =array('1','3','6','1','5','3','6','5','1','7','3','9');
i want slicing of this array.i want to create arrays from the above array but of common elements like
$array_1 = ('1','1','1');
$array_2 = ('3','3','3');
$array_3 = ('6','6');
$array_4 = ('5','5');
$array_5 = ('9');
$array_6 = ('7');
that is first find common elements in original array and make other array from that
There are several ways to do it, here is an example (by the way, quite inefficient, but enough if it is a short work):
You should take a look at http://es.php.net/manual/en/ref.array.php