[Solved] How to define day is sunday and Normal day. using switch case by date? [closed]


Try it:-

function holyday($today)
{
    $start_date = strtotime($today);


    if(date('z',$start_date) ==0)
    {
         return 'New Year';

    }else{

        if(date('l',$start_date) =='Sunday')
        {
             return 'Sunday';

        }else{

            return "Noraml Day";
        }
    }
}

echo holyday('2012-09-06');

Output = Noraml Day

echo holyday('2013-01-01');

Output = New year

7

solved How to define day is sunday and Normal day. using switch case by date? [closed]