问题描述:

I have two different array format, i want assign one array value to another array value.

bellow my array format.in place of second array formula i want to assign first array values.

Array

(

[0] => Array

(

[v01] => 9.63

[v02] => 1.75

[v03] => 0.07

[v04] => 0.656

[v05] => 1.09

[v06] => 0.25

[v07] => 1

[v08] => 0.69

[v09] => 0.8

[v010] => 7.5

[v011] => 0.27

)

[1] => Array

(

[v012] => v02*v03*v04*v05*v06

[v013] => v012*v07*v08*25

[v014] => v013+v010-v011

))

网友答案:
$array[1] = array();
$array[1]['v012'] = $array[0]['v02'] * $array[0]['v03'] * array[0]['v04'] * $array[0]['v05'] * $array[0]['v06'];
$array[1]['v013'] = $array[1]['v012'] * $array[0]['v07'] * array[0]['v08'] * 25;
$array[1]['v014'] = $array[1]['v013'] + $array[0]['v010'] - $array[0]['v011'];
相关阅读:
Top