I want to add a programs based on time. that is for example a program named "ABC" added with time 11:00 AM to 02:00 AM. Then every day when time interval 11:00 AM to 02:00 PM the program ABC should display.
I tried When add --
$timefrom = strtotime('11:00 AM');
$timeto = strtotime('02:00 PM');
it will store in the database.And in the front end
$current_time = strtotime(date("h:i A"));
$current_day = date("l");
$query_pbanner = "SELECT pgm_banner FROM rj_prog WHERE ('$current_time' BETWEEN `prog_from` AND `prog_to`) AND ('$current_day' = `week_name`)";
But when date change it will not woking.is there any way to convert time only to string and compare.