I have a column in mssql table that holds numbers 1 thru 101. Using this While and if else if statement works fine. I need to add the ability to get a grey image for 101. This requires the else if statement for the yellow image to be modified but cannot get it to work. Please inspect the lower example amd let me know where I went wrong. Thanks.
WORKS:
while ($row8 = mssql_fetch_array($result8)) {
if ($row8['IPscore'] > 85) { // Get Green image
$row8['ScoreIND'] = $Good;
}
else if ($row8['IPscore'] < 69) { // Get Red image
$row8['ScoreIND'] = $Bad;
}
else {
$row8['ScoreIND'] = $Fair; // Get Yellow image
}
FAILS:
if ($row8['IPscore'] > 85) { // Get Green image
$row8['ScoreIND'] = $Good;
}
else if ($row8['IPscore'] < 69) { // Get Red image
$row8['ScoreIND'] = $Bad;
}
else if ($row8['IPscore'] (>70 and <84)) { // Get Yellow image
$row8['ScoreIND'] = $Fair;
}
else ($row8['IPscore'] == 101) { // Get Grey image
$row8['ScoreIND'] = $LowVol;
}
GETTING ERROR: unexpected '>', expecting ')'