Jump to content

Manipulating decimals


Jarod

Recommended Posts

To move the decimal place by one multiply by 10

echo (309 / 397) * 10;

 

Okay I've done the math, but I want to turn it around to a smaller number,

7.78% is not smaller than 0.778%

 

I know it's bigger, which is why i mention manipulation. I want to manipulate it as 7.78, basically make it into a collusion.

 

EDIT:

I think substr() might be of use, should be, ill try it.

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.