I have two array one for present list and other for total lectures. i want a third array that will hold the percent of two
My first array (present days list)
$allpresentAttInfo = array(
0 => array(
'year' => '2013',
'term' => 'T1',
'presentDays' => '123'
),
1 => array(
'year' => '2013',
'term' => 'T2',
'presentDays' => '112'
)
);
My Second array (Total days list)
$allAttInfo = array(
0 => array(
'year' => '2013',
'term' => 'T1',
'totalDays' => '200'
),
1 => array(
'year' => '2013',
'term' => 'T2',
'totalDays' => '216'
)
);
My Resultant array should be like this
$attInfo = array(
0 => array(
'year' => '2013',
'term' => 'T1',
'presentPercent' => '63.7 %'
),
1 => array(
'year' => '2013',
'term' => 'T2',
'presentPercent' => '42.7 %'
)
);
So by merging both the arrays i will have to find the present present in given year and term. How to achieve this on PHP side. Thanks in advance