$userlist = [
["name"=>"zhang","money"=>10, "level"=>1],
["name"=>"wang", "money"=>20, "level"=>2],
["name"=>"li", "money"=>10, "level"=>3],
["name"=>"zhao", "money"=>30, "level"=>3],
["name"=>"wu", "money"=>20, "level"=>5]
];
how to count out the values of money in groups according to level and output them sequentially.
if the level is the same, the money adds up. For example, for level=3, the length of the money=10+30=40,userlist array is unknown.