Group by array using multiple values and sum of array based on group values in loop and sorting array
问题 I want to group array values and find total (sum of array value-based of the group by value) and then sort array based on total. I want to group by users by fund type ("Private, VC, Others") and the sum of total fund ("last value") I have set up a demo link here. https://3v4l.org/6WNKE <?php $data = [ [ 'Jon', 'NO', "", "Private", 120 ], [ 'Andew', 'NO', "", "VC", 150 ], [ 'Walid', 'YES', "", "Other", 160 ], [ 'Andew', 'YES', "", "VC", 150 ], [ 'Andew', 'YES', "", "VC", 180 ], [ 'Jon', 'NO',