Page 1 of 1

i have a qusetion about some problem

Posted: Sun Dec 20, 2009 12:11 pm
by yuri1992
i had a qusteion in my test , i need to build a script that
get a number and the number sum numeral.
exp

123456 = 66 i need to print = 12+3+45+6
5025 = 30 i need to print = 5+0+25
1245= 129 i need to print = 124+5.

how i solve this >

Re: i have a qusetion about some problem

Posted: Sun Dec 20, 2009 2:53 pm
by califdon
This is a mathematical problem, not a PHP code problem, even if you are being asked to write PHP code to do it. How would you solve it, manually? What would your thought process be? When you can answer that question, the PHP code should be easy. If you need help after you know how to do it manually, we will help you.