Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

1. ## Decimal

How could I change a number to a decimal, like 4 to .04 like percents.

• I don’t get what you mean by decimal. and what kind of conversion?

• If you are asking of changing 4 to .04 like percents, you simply divide it by 100 ...
PHP Code:
``` \$p = \$p/100;  ```
If the question is different, could you explain it a little bit more in detail please ?

• Lol, ya thats what it is, and im good at math, but whenever it comes to this I want to make sure im doing it right.

PHP Code:
``` \$buildtimediv[\$num] = (1*962)*((2*2)/100); //To get 4% of 962(16:02) \$buildtime[\$num] = (1*962)-\$buildtimediv[\$num]; //Subtract the 4& from orig.  ```

Would that be correct? and how do I convert the outcome back to a time.

The 1* part is acually an output from a form based on how many you want to build
and
The 4* is based on your level and *2 because the % is x2 your level and thats the part I need help turning into a decimal which the /100 does.

•

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•