Good evening!
I would like to ask your help in the following ...
I need to read a txt, which contains information from a client x ...
I'm not sure what to do,
I need to separate this data and save it to a database ... I have been able to separate it into parts ... But it looks like this:
Array ([0] => 000145010730634CARLOS SILVA 0000015255) Array ([0] => 0001) Array ([0] => 00000102534) Array ([0] => CARLOS SILVA) Array ([0] = > 152.55)
And I do not know how to put those values in my bank.
I have this code here:
$arquivo = $_FILES['arquivo'];
$arquivo_tmp = $_FILES['arquivo']['tmp_name'];
$dados = file($arquivo_tmp);
foreach ($dados as $linha) {
$values = explode("\r\n|\r|\n", $linha);
print_r($values);
}
This code gives me that result ...
Now I need to put that data into a table ...
If you can help me.
Thank you in advance!