What values do the variables $month, $day, and $year contain?

    $month and $year are read from an external file.
    No date is read from the external file.

    $daysInMonth simply wants to get how many days in a month.
    $date just want to echo back the month & year as follows:


    $date = mktime(0, 0, 0, $month, $day, $year);

    echo date("F Y", $date);

      Okay, but have you actually used something like [man]var_dump/man to verify the exact contents of those variables?

        I mean no $day is read from the external file.

          let's assume that I want to find first day of each month, that is 1.
          So $day = 1

          How do u implement that into the code above?

            that was what i did, but I got that error of "Notice: A non well formed numeric value encountered ". Tried to use strtotime, didn't work out either.

              Okay; so what you do now is go back and follow bradgrafelman's advice.

                In other words, you still haven't answered my question:

                bradgrafelman;10995816 wrote:

                Okay, but have you actually used something like [man]var_dump/man to verify the exact contents of those variables?

                (Also, note that I've split our posts into a new thread; no reason to hijack someone else's already-resolved thread in order to discuss your own issue.)

                  Write a Reply...