Good afternoon guys, I know the question may seem repetitive, but I'm already looking for the solution to my case, especially here in #stack.
I have the following Array () :
array (size=9)
'Janeiro' =>
array (size=54)
0 =>
array
'nome' => string 'Pessoa1'
'valor' => string '9'
1 =>
array
'nome' => string 'Pessoa2'
'valor' => string '2'
2 =>
array
'nome' => string 'Pessoa1'
'valor' => null
3 =>
array
'nome' => string 'Pessoa2'
'valor' => null
4 =>
array
'nome' => string 'Pessoa3'
'valor' => null
'Fevereiro' =>
array
0 =>
array
'nome' => string 'Pessoa1' (
'valor' => string '28'
1 =>
array
'nome' => string 'Pessoa2'
'valor' => string '17' (length=2)
2 =>
array
'nome' => string 'Pessoa3'
'valor' => string '2' (length=1)
3 =>
array
'nome' => string 'Pessoa1'
'valor' => null
4 =>
array
'nome' => string 'Pessoa2'
'valor' => null
5 =>
array
'nome' => string 'Pessoa3'
'valor' => null
6 =>
array
'nome' => string 'Pessoa4'
'valor' => null
... And so on containing every month currently. I'm trying to return an array that looks like this:
array
'Pessoa1' =>
array
meses => v1,v2,v3,v4,v5,v6,v7,v8,v9
array
'Pessoa2' =>
array
meses => v1,v2,v3,v4,v5,v6,v7,v8,v9
And so on picking up all "People", only that as shown in exe. has month that the value of the person is null and has month that it has value, so I need to keep the values null, ex [null, null, 2,3,4,5,6, null, null]