I have an array in the following format
filmtarin.com 1081760 filmtarin.com 380336 filmtarin.com 285200 filmtarin.com 101152 google.com 101152 google.com 101152
I want to output the domain name only once if the domain is duplicated with the previous domain and add the number in front of each domain and the output is only the domain name + the sum of the number in front of the domain
It may be another domain and other numbers, but whatever the domain is, I want the sum of the numbers in front of it to be added and the output to be given to me.
how can i get the total number