1
I have the need to create an array more or less like in the code below:
$documento = array();
$campo = array();
array_push($documento, "1", "CPF");
array_push($campo, "1", "Nº CPF", "000.000.000-xx");
array_push($campo, "2", "NOME TITULAR", "FULANO A");
array_push($documento, $campo);
array_push($documento, "2", "RG");
array_push($campo, "1", "Nº RG", "x.xxx.xxx");
array_push($campo, "2", "NOME TITULAR", "FULANO A");
array_push($documento, $campo);
array_push($documento, "3", "COMP ENDERECO");
array_push($campo, "1", "Nº ENDERECO", "RUA DAS DUVIAS Nº 1");
array_push($campo, "2", "NOME TITULAR","FULANO A");
array_push($documento, $campo);
array_push($documento, "1", "CPF");
array_push($campo, "1", "Nº CPF", "111.111.111-xx");
array_push($campo, "2", "NOME TITULAR", "FULANO B");
array_push($documento, $campo);
array_push($documento, "2", "RG");
array_push($campo, "1", "Nº RG", "yy.yyyy.yyy");
array_push($campo, "2", "NOME TITULAR", "FULANO B");
array_push($documento, $campo);
array_push($documento, "3", "COMP ENDERECO");
array_push($campo, "1", "Nº ENDERECO", "RUA DAS DUVIAS Nº 2");
array_push($campo, "2", "NOME TITULAR","FULANO B");
array_push($documento, $campo);
And then I need to go through bringing the information in an organized way, aiming to create a table. The number of documents is variable and so is the number of fields, so you would need help with a malleable execution.
Thanks in advance for the help.
You’re abstracting a person’s data, right? You want to generate a table for each person or each person in a table row?
– ShutUpMagda
Each person is a row in the table. In fact I would like to do so: in CPF, for example, all the data relating to each field of the Cpf of all were grouped and so with all other fields.
– Eduardo Schettini Guimarães