'in a database query show the text in red if Resultado is equal to failed

It is possible to show the output of the query but I want it to be shown in red when the result is failed.

<?php
$serverName = "10.100.13.23"; //serverName\instanceName
$connectionInfo = array( "Database"=>"demo", "UID"=>"sa", "PWD"=>"Passw0rd");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
// Check connection
if ($conn===false) {
die("Connection failed: ");
}
$sql = "SELECT Objeto, Metrica, Valor, Result, job_name FROM valid_jobs WHERE Objeto = '10.100.13.23'";
$result = sqlsrv_query( $conn, $sql);
if ($result) {
// output data of each row
while($row = sqlsrv_fetch_array( $result, 2)) {
echo "<tr><td>".$row["Objeto"]."&nbsp;"."</td><td>".$row["Metrica"]."</td><td>"
.$row["Valor"]."</td><td>".$row["Result"]."</td><td>".$row["job_name"]."</td></tr>";
}
echo "</table>";
} else { echo "0 results"; }
sqlsrv_close( $conn);
?>
```[here information from the query][1]


  [1]: https://i.stack.imgur.com/Uuc1Q.png


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source