I'm having trouble changing the color of a value if it is a certain word, I'm using PDO to get data from a database, will be pasting the code down below.
What I want is .. if the variable " estado " is " Em analise " then the color should be red..
$stmt = $conn->prepare("SELECT * FROM orcamento");
if ($stmt->execute()) {
echo "<div class='panel-body'>";
echo "<div class='table-responsive'>";
echo "<table class='table table-striped table-bordered table-hover'>";
echo "<thead>";
echo "<center>";
echo "<tr>";
echo "
<th># </th>
<th>Estado</th>";
echo "</tr>";
echo"</thead>";
echo "<br>";
while ($rs = $stmt->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "
<td>$rs->CodOrc </td>
<td>$rs->estado </td>";
echo "</tr>";
}
echo "</table>";
} else {
echo "Error";
}