Arithmetic Operations in Arrays with PHP

Posted by Ajith on Stack Overflow See other posts from Stack Overflow or by Ajith
Published on 2010-05-31T07:30:23Z Indexed on 2010/05/31 7:32 UTC
Read the original article Hit count: 168

Filed under:
|

I have two arrays

$data1 = array()
$data1 = array( '10','22','30')

and also another array carries

$data2 = array()
$data2 = array( '2','11','3');

I need to divide these two arrays(ie,$data1/$data2) and store value to $data3[]. I need to get it as follows

$data3[] = array('5','2','10')

If someone knows of an easy way to do this would be of great help. Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about arrays