0
I cannot make a batch change to the information displayed through While
.
What I want to do is create a new Array
with the information I am sending via POST
, that is, send the information via POST
, that creates the Array
down below.
Array
(
[exibirconcessao] => Array
(
[0] => Array
(
[id] => 91
[field3] => 2222
[field2] => 3
[field4] => 2016-04-15 15:38:24
[field5] => REVENDA
[field12] => 1111
[field13] => 11111
[field61] => CRISTIANO
[field62] => DUTRA IGLESIAS
[field7] => RS1001-001
[field8] => RS Sede
[field14] => 1
[field9] => 4
[field10] => 1
[field16] => criado usuario
[numerochamado] =>
[novostatus] =>
[observacoes] =>
)
[1] => Array
(
[id] => 92
[field3] =>
[field2] => 1
[field4] => 2016-04-15 15:38:24
[field5] => REVENDA
[field12] =>
[field13] =>
[field61] => CRISTIANO
[field62] => DUTRA IGLESIAS
[field7] => RS1001-001
[field8] => RS Sede
[field14] => 2
[field9] => 4
[field10] => 1
[field16] => criado usuario
[numerochamado] =>
[novostatus] =>
[observacoes] =>
)
[2] => Array
(
[id] => 93
[field3] =>
[field2] => 1
[field4] => 2016-04-15 15:38:24
[field5] => REVENDA
[field12] =>
[field13] =>
[field61] => CRISTIANO
[field62] => DUTRA IGLESIAS
[field7] => RS1001-001
[field8] => RS Sede
[field14] => 3
[field9] => 4
[field10] => 1
[field16] => criado usuario
[numerochamado] =>
[novostatus] =>
[observacoes] =>
)
)
)
I want to create a new Array by adding information in the last 3 fields: [numerochamado]
, [novostatus]
and [observacoes]
, this information will be provided through the Batch Change field according to the system image:
This is the Array
sent by the batch change field:
Array
(
[loteconcessao] => Array
(
['numerochamado'] => 12345
['novostatus'] => Concluido
['observacoes'] => Teste
)
)
Do you want to create a new array or simply insert this 3 data into the other array? Technically you don’t need to create a new array (unless you want to).
– Fleuquer Lima
If the intention is only to set a value for a specific key in a multidimensional array of varied or fixed size and output, this can be useful: http://answall.com/a/123596/4793
– Daniel Omine
The intention is just to create a unique array to insert the information in the BD @Fleuquerlima
– Cristiano Iglesias
@Danielomine by the tests I performed with your tip, it worked perfectly, but I ended up creating another method while waiting for an answer, I will share what I discovered as an answer to my own question, but I will study your code to understand exactly what was done in the function, thanks for the help!
– Cristiano Iglesias
Do the data contained in "[displarconcessao][0]" correspond to the data contained in [loteconcessao][0]" ? How do you identify that these data are matching?
– Fleuquer Lima