Page 1 of 1

Another Array question...

Posted: Wed Nov 09, 2005 7:08 pm
by shoxlx
Is there a way to count up all the numbers in an array?

ex :: array('1','2','5','3'); would be counted up to 11

Posted: Wed Nov 09, 2005 7:11 pm
by Luke
You can write a function to do that...

Traverse through the array and add each to the sum of the previous addition.

Posted: Wed Nov 09, 2005 7:13 pm
by shoxlx
ys i know, but i was just wondering if there was a simpler way...

Posted: Wed Nov 09, 2005 7:19 pm
by feyd