html - Php division not working -
for reason when ever compile code, gives me zero. why this?
$aou = 5; //amount of upvotes $aod = 2; //amount of downvotes $elo = (auo/aod) * 150; //elo echo "your elo is: " . $elo;
the problem type auo , aod instead of $auo , $aod. php trying constants of names, , not variables.
constants defined , used without dollar sign, e.g.
const foo = 123; echo foo; but variables need $ every time use them, thus
$bar = 123; echo $bar;
Comments
Post a Comment