I'm getting lost in all the array functions as I'm trying to manipulate two arrays.
I have two arrays:
$a = array('A' => 24,'B' => 32,'C' => 18,'D' => 26,);
$b = array('A' => 40,'B' => 19,'C' => 28,'D' => 22,);
My goal is to reorganize this array into one array:
$c = array('A' => 24/40,'B' => 32/19,'C' => 18/28,'D' => 26/22,);
I've done some experimentation with:
array_merge(), sort(), asort(), ksort()
but can't seem to wrap my head around how to do this.
Any help will be grateful! Thanks!