Insert weekly info from date and time php
<p>I have a function that is accepting the date and time, and number of occurrences of an episode.  I'm using a while loop to try and insert and episode every week on the same day and time.  For example if the episode is monday at 7PM, i want to insert in for every monday at 7PM for the number of occurrences given.</p>

<p>Here's my code and while loop:</p>

<pre><code>$sEpsAirDate =  strtotime($aVars['air_date'].' '.$aVars['air_time'].$aVars['air_ampm']);

            $i = 1;
            while ($i &lt;= $aVars['repeat_count']) {

                $sEpsAirDate =  // How can I alter this variable to change the date to every week?                      

                db_res(
                    "INSERT INTO `hm_episodes_main` SET 
                        `show_id` = '{$aVars['show_id']}',
                        `title` = '{$sEpsTitle}.{$i}',
                        `season` = '{$aVars['eps_season']}',
                        `uri` = '{$sUri}.{$i}',
                        `desc` = '{$sEpsDesc}',
                        `air_date` = '{$sEpsAirDate}'
                ");

                $i++ 
            }
</code></pre>

<p>How would I alter the $sEpsAirDate variable to be entered accurately on every day of the week on the given time?</p>
