Two Dimensional array

I have a button that creates a two dimensional array of ticket number select and price
when I print_r of the array I get this

Array ( [0] => Array ( [0] => 448.00 [1] => 77 ) [1] => Array ( [0] => 349.00 [1] => 128 ) )

which is correct.

However I need to sum the dollar values (position 0) in each array and also run update queries on the ticket Numbers (position 1) from each array.

I used the example of creating a run button to get this going but no I am a bit stuck on how best to work with this array in the onFinish section of this button.

Thanks for any assistance and let me know if there is more detail needed from me.

Thanks,

you can maybe look with in_array_sum,
ex:
in your loop,
$sum_val = array_sum($array[$x][0];
$sum_tick = array_sum($array[$x][1];