I think the easiest way would be to sort the array and then loop through the elements one by one... adding them as you go until the username changes and then just echo the total out.
To get at the key and value as seperate variables you could use the following;
foreach ( $ArrayName as $Percentage => $Username )
{
// Now in here you can directly access the Percentage as $Percentage and Username as $Username
}
Hope this helps...?