$total {exists $total {$id} ? $id : "tocredit"} += $amt;