I want to make color changing depends on date. Let's say, if less than today's date, it must show with red color otherwise it must show with green color.I will provide the screenshot.
As u can check in the screenshot, 2022-05-25 must be green and 2021-10-16 must be red. Also, I want to show DD-MM-YY in order. May I know how can I do that?
{
$type = $equipArray[$x];
$sql= "SELECT * FROM map_db_oee.`tbl_actual_correlation` WHERE `waferid` LIKE 'NSX1234%' AND prober='".$type."' ORDER BY dt_corr DESC LIMIT 1";
//echo $sql.'<br>';
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
$row = mysqli_fetch_array($result);
if ($date < $now ){
$date = "<br><font size=\"2px\" color=\"red\">".$row["dt_corr"]."</font>";}
else {
$date = "<br><font size=\"2px\" color=\"green\">".$row["dt_corr"]."</font>";
}
//echo $date.'<br>';
}
else{
$date = "";
}