you are going to have to split them up into an array somehow, then add the array values together, if the string were 5 2 2 3, you could use the explode() to create the array easily, but i wouldn't know how to do it unless it was say always 4 numbers, then you could do some string functions and grab the numbers seperately then add them