Jump to content

[SOLVED] Multiply a number of variables...


SirChick

Recommended Posts

I been wondering which way is the correct way to code this .... i have 5 variables i need to add together then multiply by 5.

 

So i got this:

 

$Total = $StrengthInput + $DexterityInput + $DefenceInput + $AgilityInput * 5;

Then i wondered would it be better to do this:

$Total = $StrengthInput + $DexterityInput + $DefenceInput + $AgilityInput;

$NewTotal = $Total * 5;

Link to comment
https://forums.phpfreaks.com/topic/71542-solved-multiply-a-number-of-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.