How to Rotate different data in days of the week in php
<p>I am working on a project in which i have to distribute different ad's per day, the ad's in form of array are:</p>

<pre><code>$ad = array( 'attribute1_value' =&gt; "12",
 'attribute2_value' =&gt; "xyz",
 'attribute3_value' =&gt; 'http://example.com',
 'attribute4_value' =&gt; 'data');
</code></pre>

<p>The logic i am using with switch case :</p>

<pre><code>$day = date('w',time());

    switch ($day) {
        case '0':
        if($day == '0') {
            $count = 0;
            echo $ad;
            $count++;
        }
        else {
            $count = 7;
            echo $ad;
        }
        break;

            case '1':
        if($day == '1') {
            $count = 1;
            echo $ad;
            $count++;
        }
        else {
            $count = 8;
            echo $ad;
        }
        break;
</code></pre>

<p>Problem is if i have ~15 ad's then i want to distribute ad/day, date('w') output's the present day but after day 7 i.e saturday, on sunday ad number 8 initiate. I have to implement this scenario using date function. Also i have to send ad's to those user who are not experience this ad before. I am not expert in php, as a beginner working in php/mysql. Kindly help me to improve this concept</p>
