I have a service that return all items from DDBB.
Each item have Name and Number (1,2,3,4,...99,..,).
In DDBB I have differents items with different Name and different items with the same Name .
The idea is: list all items but if in DDBB exist 2 or more items with the same name, list only one with the summatory.
Ex:
In DDBB:
Dani, 3
Albert,3
Jeff, 5
Dani, 8
List:
Dani, 11
Albert,3
Jeff, 5
My idea is call the service, save global list inside one local variable, edit local variable and call the service with echo.
My questions are:
How i can save the list in local variable? I know how to save string but not arrays.
Any one know any better method to do this?
Thanks for your help