For some reason this isn’t storing the variable correctly giving me a value of “0” after the equation.
if ($power_weight == '') {
$power_weight = NULL;
}
else {
$power_weight = $power_weight / 1.01387 * 2.20462262;
}
echo $power_weight;
When a similar equation works fine
if ($zero_sixty == '') {
$zero_sixty = NULL;
}
else {
$zero_sixty = $zero_sixty * 60 / 62;
}
echo $zero_sixty;
What’s the value of power_weight before this snippet? Is it a string or a float? I’d encourage you to parse it by doing floatval() on it.