Checking date & time in PHP
To add to Andrew's answer about taking advantage of what type of timestamps can be creating using strtotime(), your code can be reduced to around 25 lines...

&lt;?php

$schedule = array(
    'this Sunday 8am',
    'this Sunday 10am',
    'this Sunday 12pm',
    'this Sunday 6:30pm',
    'this Wednesday 7pm',
    'this Saturday 10am'
    );

$current_time = strtotime('now');
foreach ($schedule as &amp;$val) {
    $val = strtotime($val);
    // fix schedule to next week if time resolved to the past
    if ($val - $current_time &lt; 0) $val += 604800; 
    }
sort($schedule);
$countdown = $schedule[0] - $current_time;

?&gt;

&lt;script type="text/javascript"&gt;
    var myTime = &lt;?php echo $countdown; // just personally prefer full tags ?&gt;;
    $('#countdown').countdown({ until: myTime}); 
&lt;/script&gt;


To add to visionary-software-solutions' answer, it would be best to store the schedule in a database or a separate xml/text/json/etc type file.  This way, you can have staff simply use an internal webform to change schedules instead of having the PHP dev hard-code the changes every time.  In that webpage, you can allow staff to only select a weekday and time, and have the page translate that into a string usable by strtotime() in this countdown script.

Edit: fixed strtotime() values.  Careful with "this day" vs "next".  For some insight into what type of strings strtotime() can take, see: http://www.gnu.org/software/tar/manual/html_node/Date-input-formats.html