For loop?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

For loop?

Post by pinehead18 »

I need help making a for loop..

Basically i need it to say this..

$total =variable[1] + variable[2] + variable[3] + variable[4] + variable[5] + variable[6] + variable[7];

Thanks for any input.

Anothony
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

no loop needed: array_sum()
Post Reply