How do I insert this conditional statement:
if if ($err < "1" ) echo ('bgcolor="green"');
if ($err > "2" and $err < "5" or $err == "2" or $err == "5" ) echo ('bgcolor="yellow"');
if ($err > "6" or $err == "6" ) echo ('bgcolor="red"');
into the <td> tag of this array & not get this error:
Parse error: parse error, expecting ','' or';''
while ($r = mysql_fetch_array($result)) {
$name = $r["Name"];
$location = $r["Location"];
$err = $r["Error"];
$band = $r["Bandwidth"];
$cpu = $r["CPU"];
$conn = $r["Connectivity"];
echo "<tr>
<td align=center>$name</td>
<td align=center>$location</td>
<td align=center>$err</td>
<td align=center>$band</td>
<td align=center>$cpu</td>
<td align=center>$conn</td>
</tr>";
}
**
I tried this first and got the parse error:
<td align=center if ($err < "1" ) echo ('bgcolor="green"');
if ($err > "2" and $err < "5" or $err == "2" or $err == "5" ) echo ('bgcolor="yellow"');
if ($err > "6" or $err == "6" ) echo ('bgcolor="red"');>$err</td>
**
Any ideas?
Thx in advance for any & all help!