I have an If Statement that isnt loading the right image any help would be great
<?php
if($formattedNum6 > $PeriodSalesTarget):{
echo '<img src="images/TargetMetGreen.png" alt="" />';}
elseif($formattedNum6 > $CummulativePeriodSalesTarget):{
echo '<img src="images/TargetMet.png" alt="" />';}
else:{
echo '<img src="images/TargetNotMet.png" alt="" />';}
endif;
?>
$formattedNum6 = 515,839
$PeriodSalesTarget = 1,366,000
$CummulativePeriodSalesTarget = 503,600
So it should show TargetMet.png but instead is showing TargetMetGreen.png
If i change the PeriodSalesTarget to 999,999 it works so looks like it isnt treating the values as numbers but i dont know how to fix