If you put a "0.10" behind $num1 it would result in 100.10. I *think* what you are wanting to do is treat $num1 as a percentage. So, $num1 * $num2 = (0.10) * 10 = 1. Is that correct? Then this is simple math and not a coding issue:
$num1 = 10;
$num2 = 10;
$result = ($num1/100) * $num2;
echo $result;
That is for adding a percentage, I'm trying find the percentage of a number.
for example, what is 50% of 100:
0.5x100 = 50
I think I've found what i was looking for anyway.
$number3 = 50;
$number4 = 100;
$number3 /= 100;
$number1 = $number3 * $number4
echo "<script>alert('$number3 is $number1 as a percentage')</script>";
}
?>
Because I'm a beginner php programmer, i can't find a better way.
P.S that code works.