PHP script to display day/month..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xxweekxx
    Confirmed User
    • Oct 2002
    • 6780

    #1

    PHP script to display day/month..

    I want a php script that will say!! I basically want the variables to be Wednesday & October 23rd. SO tomorrow itll say Thursday, October 24th

    Today is Wednesday, October 23rd.



    Can anyone paste it? I need it for one of my sites..
    _________________
    I am the best
  • Sands
    Confirmed User
    • Feb 2007
    • 3134

    #2
    Originally posted by xxweekxx
    I want a php script that will say!! I basically want the variables to be Wednesday & October 23rd. SO tomorrow itll say Thursday, October 24th

    Today is Wednesday, October 23rd.



    Can anyone paste it? I need it for one of my sites..
    http://us.php.net/date

    Comment

    • neonliquid
      Confirmed User
      • Feb 2008
      • 329

      #3
      Code:
      <?php
      $today = date("l, F  jS");
      echo $today;
      ?>
      Fully Coded Wordpress Themes - $25
      My Portfolio | Premade Toons - $25 each - ICQ: 411554070

      Comment

      • xxweekxx
        Confirmed User
        • Oct 2002
        • 6780

        #4
        nm......................
        Last edited by xxweekxx; 10-22-2008, 12:11 AM.
        _________________
        I am the best

        Comment

        • neonliquid
          Confirmed User
          • Feb 2008
          • 329

          #5
          Originally posted by xxweekxx
          I cant seem to get it to display the th or st at end of day

          example

          october 20> october 20th
          january 1> january 1st.

          How do i do this
          make sure you're using "jS" instead of just "j" in the date formula. just copy paste the example i gave you, here it is in action: http://www.319studios.com/date.php
          Fully Coded Wordpress Themes - $25
          My Portfolio | Premade Toons - $25 each - ICQ: 411554070

          Comment

          • xxweekxx
            Confirmed User
            • Oct 2002
            • 6780

            #6
            Originally posted by 319studios
            Code:
            <?php
            $today = date("l, F  jS");
            echo $today;
            ?>
            Thanks bro.. owe u one =)
            _________________
            I am the best

            Comment

            • xxweekxx
              Confirmed User
              • Oct 2002
              • 6780

              #7
              Originally posted by 319studios
              make sure you're using "jS" instead of just "j" in the date formula. just copy paste the example i gave you, here it is in action: http://www.319studios.com/date.php
              yea it was my mistake.. thanks a lot
              _________________
              I am the best

              Comment

              • neonliquid
                Confirmed User
                • Feb 2008
                • 329

                #8
                no problem glad i could help
                Fully Coded Wordpress Themes - $25
                My Portfolio | Premade Toons - $25 each - ICQ: 411554070

                Comment

                Working...