Is there a way to add, without being manually, an indexed array? For example:
$arrayNomeBDs[0] = array (
"nome_tabela" => "TabelaDeNome1",
"db-tb-name" => "table_name_bd1"
);
$arrayNomeBDs[1] = array (
"nome_tabela" => "TabelaDeNome1",
"db-table-name" => "table_name_bd2"
);
If I put in the next iteration as index = 3
, it will give error
$arrayNomeBDs[3] = array (
"nome_tabela" => "TabelaDeNome1",
"db-tb-name" => "table_name_bd2"
);
This is my for
to go through:
will give error if I put index = 3 if I follow the previous example:
for($i = 0; $i<sizeof($arrayBDs);$i++){
var_dump($arrayBDs[$i]['nome_tabela']);
if($arrayBDs[$i]['nome_tabela'] === $BD_Escolhido){
return $arrayBDs[$i]['db-tb-name'];
}
}
In the future it will take work to remove a bank from the array and manually index the indexes all over again, as I have 40 banks to create (all the time a new bank enters or one or more is removed), then forward it will take work to do the maintenance.