I need to get the value of two different arrays and put them in the database, I tried with the code below, but I'm having difficulty separating the two values and adding each of the values to their respective database fields. p>
<?php
$array = array(12.1, 12.3, 18.32, 12.45, 1.5, 1.5);
$array2 = array(12.3, 2.3);
foreach(array_combine($array, $array2) as $key => $media) {
$media = str_replace(",",".",$media);
$media_total = str_replace(",",".",$media_total);
var_dump($key, $media);
var_dump($key, $media_total);
}
?>