Username: Posted March 11, 2011 Share Posted March 11, 2011 I have these numbers in an array: 14042 11130 10100 10100 9506 How can I add them all together? Was thinking about a while loop. Derp. >array_sum solved! Quote Link to comment Share on other sites More sharing options...
silkfire Posted March 11, 2011 Share Posted March 11, 2011 No need: $sum = array_sum($array); Quote Link to comment Share on other sites More sharing options...
Username: Posted March 11, 2011 Author Share Posted March 11, 2011 No need: $sum = array_sum($array); Just as I decided to actually search my problem I found the solution as you posted. Weird. Thanks anyways EDIT: What happened to my solved button ._. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.