Jump to content

Adding variables


Prank

Recommended Posts

Hi Guys,

I am a bit unsure of how to do this, I'd appreciate any help.

What I am trying to do is add up a total number as reported by variables, but the problem is that its the same variable..

For eg;
[code]
while {

$total = 3;

}
[/code]

How would I add all the $total's for each instance that the 'while' was run?

I hope this makes sense and I am assuming it is an easy answer..

Thanks in advance,

Christian
Link to comment
Share on other sites

So that would just add a 1 to the variable $count each time its run?

Heres my actual code; [a href=\"http://pastebin.com/658997\" target=\"_blank\"]http://pastebin.com/658997[/a]

I need to grab the total value of $total and $qty

Thanks for your help.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.