PHP image swap based on day and url
===

My goal is to have a background image swapped out according to the day of the week and to the link the user came from.

example:

Monday, index.php = bg1.jpg

Monday, about.php = bg2.jpg

Tuesday, index.php = bg3.jpg

Tuesday, about.php = bg4.jpg


This is my switch that handles the case of the week but not sure how to go from here:

    <?php
    
    // Variables
    $url = "images/days/";
    $monImage = "$url"."bg_mon_a.jpg";
    $tueImage = "$url"."bg_tue_a.jpg";
    $wedImage = "$url"."bg_wed_a.jpg";
    $thurImage = "$url"."bg_thu_a.jpg";
    $friImage = "$url"."bg_fri_a.jpg";
    $weekendImage = "$url"."bg_default.jpg";
    $d = date("D");
    //Function that switches between date images based on the actual day of the week in $d
    switch ($d)
    {
    case Mon:
    echo "<img id='bg_image' src=$monImage>\n";
    break;
    case Tue:
    echo "<img id='bg_image' src=$tueImage>\n";
    break;
    case Wed:
    echo "<img id='bg_image' src=$wedImage>\n";
    break;
    case Thu:
    echo "<img id='bg_image' src=$thurImage>\n";
    break;
    case Fri:
    echo "<img id='bg_image' src=$friImage>\n";
    break;
    default:
    echo "<img id='bg_image' src=$weekendImage>\n";
    }
    //End
    ?>