I have a Form with input checkbox and text
'<input type="checkbox" name="formandos_servicos[]" value="'+data['id']+'">'+
'<input type="text" name="nome_funcionario_servicos[]" value="'+data['title']+'" >'+
'<input type="text" name="naturalidade_servicos[]" value="'+data['naturalidade']+'" placeholder="Naturalidade">'+
I count the input that is loaded in Form
for($i = 0; $i < $count; $i++) {
$data[] = array(
'formandos_servicos' => $formandos_servicos[$i],
'nome_funcionario_servicos' => $nome_funcionario_servicos[$i]
);
}
In print_r ($ data) the result is:
[1] => Array
(
[formandos_servicos] => 680
[nome_funcionario_servicos] => Alberto Damião Pimenta
)
[2] => Array
(
[formandos_servicos] => 678
[nome_funcionario_servicos] => Celestino José Faria Oliveira
)
The result of [formand_services] corresponds to the 2nd and 3rd checked checkbox. The result of [service_function_name] corresponds to the 1st and 2nd input text.
Someone, please know how to match the checkbox with the input text?