This is my multidimensional array:
<?php
$beneficiarios = array
(
array(
"codigo_membro" =>$cod,
"nome" => $_POST['nome1'],
"n_identificacao" => $_POST['n_identificacao1'],
"parentesco" => $_POST['parentesco1'],
"telefone" => $_POST['telefone1'],
"email" => $_POST['email1']
),
array(
"codigo_membro" => $cod,
"nome" => $_POST['nome2'],
"n_identificacao" => $_POST['n_identificacao2'],
"telefone" => $_POST['telefone2'],
"email" => $_POST['email2']
)
);
?>
I would like to read the elements within each array in the multidimensional array.
For example: I would like to be able to print what is written 'name' for each array.
I think maybe a loop of repetition applies, but I'm out of ideas I tried:
<?php echo $beneficiarios[0][1]?>
But it is giving error.