I have three arrays as follows:
$a=Array ( [0] => 'member0' [1] => 'member1' [2] => 'member2' [3] => 'member1');
$b=Array ( [0] => 'id0' [1] => 'id1' [2] => 'id2' [3] => 'id1');
$c=Array ( [0] => 'tf0' [1] => 'tf1' [2] => 'tf2' [3] => 'tf1');
I would like to group their values according to their keys in a 2 dimensional array to output the following:
$2dim_array=array(array('member0','id0','tf0'),array('member1','id1','tf1'),array('member2','id2','tf2'),array('member1','id1','tf1'));
After, I would like to remove any duplicate array inside of the previous 2 dimensional array and output something like this:
$remove_duplicates=array(array('member0','id0','tf0'),array('member1','id1','tf1'),array('member2','id2','tf2'));
How can I do this?
Note: The arrays of this example only contain 3 elements each, but the length of my arrays can be variable (undefined number of keys).