PHP find the nearest number

kengumuoi

New Member
How can I find what table cell contains time that is nearest the current time?The time table is created using PHP code like:\[code\]for ($i = 1; $i <= 24; $i++) { $timetable=strftime("%X", mktime(0, 0, $hour[$i], $month, $day, $year)); }\[/code\]With this PHP code I get the time table for current day like:\[code\] time |---------- 05:09:23 |---------- 07:23:18 |---------- 11:55:41 |---------- 14:01:32 |----------\[/code\]The thing that I need is to change the background color of cell where the printed time is nearest the current time.Hos can I do that?
 
Back
Top