php - How divide values in one multidimensional array by values in another -
i have 2 multidimensional array, need divide values in 1 values in another, , put results third multidimensional array. started example here but, said, have multidimensional array.
$arrayone = array(63) [ [0]=> [ 'prod one', 'city one', 2, 4, 1, 2, 0, 1, 0, ]...., ,]; $arraytwo = array(63) [ [0]=> [ 'prod one', 'city one', 8, // need divide these values corrispective ones in $arrayone 20, 23, 0, 12, 0, 0, ],....,]; result should array $arraythree = array(63) [ [0]=> [ 'prod one', 'city one', 4, /* arraytwo 8 / 2 arrayone... */ 5, 23, 2, 0, 12, 0, ],...
not clear want go this.
this should values: $key, $k, , $v
foreach ($arrayone $key => $value) { foreach($value $k => $v){ } }
Comments
Post a Comment