0
  $redData = $row['red_data'];
                $amberData = $row['amber_data'];
                $greenData = $row['green_data'];
                if( $currentValue < $amberData )
                {
                  echo "<div style='color:red'>".$currentValue. "</div>";
                }
                elseif($currentValue >= $amberData && < $greenData)
                {
                  echo "<div style='color:#FFBF00;font-weight:bold;'>".$currentValue. "</div>";
                }

In the elseif statement I want the currentValue is greater and equal to amberData AND lower than greenData, but there is an error shown that unexpected '<' in that line.

Simon Teoh
  • 15
  • 4
  • `$currentValue >= $amberData && < $greenData` - you need to write the comparison variable twice i.e. `$currentValue >= $amberData && $currentValue < $greenData` – Nick Oct 20 '19 at 04:34
  • oh, I have forgotten this. Thank you and it worked. – Simon Teoh Oct 20 '19 at 04:37

0 Answers0