samedi 17 septembre 2016

Convert multi-dimentional array to 1d array

Hello everyone I have a multi dimentionnal array and I want to convert it to a 1d array.

I have :

Array ( 
[0] => Array ( [1] => 3 ) 
[1] => Array ( [1] => 3 ) 
[2] => Array ( [1] => 3 ) 
[3] => Array ( [2] => 1 ) 
)

And I want:

Array ([1] => 3 , [1] => 3, [1] => 3, [2] => 1).

The problem is that I want to keep the same key. Lot of thanks. Victor




Aucun commentaire:

Enregistrer un commentaire