Jump to content


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


calculating percentages

Recommended Posts

i don't know why the following isn't working. I'm trying to calculate 10% of a value?

$a = 10/100;
$b = 0;
$b = $a*$b;
echo $b;

it just gives me 0 :|

Share this post

Link to post
Share on other sites


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.