Michdd Posted November 15, 2008 Share Posted November 15, 2008 How can I move a decimal in php of a number, or in other words, convert a number into a percentage. Quote Link to comment Share on other sites More sharing options...
AndyB Posted November 15, 2008 Share Posted November 15, 2008 divide it by a hundred!! Quote Link to comment Share on other sites More sharing options...
Michdd Posted November 15, 2008 Author Share Posted November 15, 2008 If I divide 1 by 100 I get 0.01, and 1 = 100%. Quote Link to comment Share on other sites More sharing options...
Garethp Posted November 15, 2008 Share Posted November 15, 2008 Times by a hundred then Quote Link to comment Share on other sites More sharing options...
Garethp Posted November 15, 2008 Share Posted November 15, 2008 Times by 10 to move the decimal point back one place Divide to move it forwards 1.00 * 10 = 10.0 .35 * 10 * 10 = 35.0 .56 / 10 = .056 Quote Link to comment Share on other sites More sharing options...
.josh Posted November 15, 2008 Share Posted November 15, 2008 ($x / $y) * 100 example: If you have 65 beans, and 23 are black and 42 are white, what percentage of black and white beans are there? (23 / 65) * 100 = 35.38% black (42 / 65) * 100 = 65.63% white Quote Link to comment Share on other sites More sharing options...
jordanwb Posted November 15, 2008 Share Posted November 15, 2008 Didn't we cover how to make percentages in like grade 3? Quote Link to comment Share on other sites More sharing options...
Garethp Posted November 16, 2008 Share Posted November 16, 2008 Grade 3? No, that was Long Division. Percentages was like, waaaay before... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.