samedi 17 septembre 2016

Unset the array of a multidimentionnal array who have the same key value

Hi everyone I'm new in programming and I'm trying to unset the array of a multidimentionnal array where
the key are the same and to put them in a 1d array;

I have : Array ( [0] => Array ( [key1] => 3 ) [1] => Array ( [key1] => 3 ) [2] => Array ( [key1] => 3 ) [3] => Array ( [key2] => 1 ) )

I need : Array([0] => Array([key1] =>3) [1] => Array([key2] => 1))

And at the end : Array([key1] => 3 , [key2] => 1)

Lot of Thanks. Victor




Aucun commentaire:

Enregistrer un commentaire