Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • cal_days_in_month() function in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 95
    Comment on it

    cal_days_in_month() function is a PHP calendar function. This function always return number of days in a specified calendar for month of year .


    Syntax is : -

    cal_days_in_month ( $calendar, $month, $year );
    

    parameter are : -

    calendar - Required. Calendar for calculate.

    month - Required. Month of that calendar

    year - Required. Year of that calendar


    Return value is length in day of calendar selected month


    Example : -

    <?php
       $num = cal_days_in_month(CAL_GREGORIAN, 8, 2003);
       echo "There was $num days in August 2003";
    ?> 
    

    Output is -

    There was 31 days in August 2003
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: