php - represent value of array products in another array -


i have array {

$e = array ( [0] => 13 [1] => 11 [2] => 2 ) array ( [989.32] => 13 [77] => 11 [0.99] =>2 ); 

and want multiply each key values respectively , use values create array. know how? i've tried:

foreach($e $y=>$z) {$x= $y * $z; $p=array(); array_push($p,$x);} print_r($p); 

but got:

array ( [0] => 1.98 ) 

one little change in code:

$p=array(); foreach($e $y=>$z) { $x= $y * $z; array_push($p,$x); } print_r($p); 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -