Galera, I need to convert the data format of the fields from my form to write to my bank. As the data is coming from the form by array I am not able to capture them and convert before writing. The date field is on my form marked " " and masked in the format 00/00/0000 from there when I need to convert it to 0000 / 00/00 . The value field is in my form as " value [] " with currency mask 1,000,00 but I need to convert it to 1000.00 . I have tried the conversion before and also inside the loop but it gives error.
$valorparc = $_POST['valor'];
$data_vctoparcela = $_POST['vencimento'];
$quant_linhas = count($_POST['valor']);
for ($i=0; $i<$quant_linhas; $i++) {
$data = $data_vctoparcela[$i];
$valorp = $valorparc[$i];
mysql_query("INSERT INTO lc_parcelas (ID,cod_cliente,id_fatura,valor_parcela,data_vcto,parcela)
VALUES('".$idEMP."','".$cod_cliente."','".$id_fatura."','".$valorp."','".$data."','".$i."')") or die (mysql_error());
}