foreach ( $period as $dt )
{
$new=$dt->format("Y-m-d");
$sql1=mysql_query("SELECT * FROM enginner_timesheet e, cz c
WHERE e.enginner_name='$name'
and c.fullname='$fullname'
and e.date='$new' ");
$row2= mysql_fetch_array($sql1);
$in_time=$row2["in_time"];
// if the condition apply
if ($in_time > "10:20")
$in_time = "<font color='#FF0000'>" .$in_time. "</font>";
//if the condition met than time font will be red
echo "<td>".$in_time."-".$row2["out_time"]."-".$row2["other_details"]."</td>";
}
I want to require if the condition is true than font text will be red but my output differs. The value is shown in red but 10:23 shows in red and 9:23 also shows in red.