1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

script for "day of the week"?

Discussion in 'PHP & Perl' started by halifax123, Sep 10, 2010.

  1. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    hi roomies :)

    I'm trying to find a script that when someone visits my site it say something
    like hope your friday is good ...

    trying to find a script that only has the specifc name
    monday tuesday ...etc,.,.. I don't want the full date

    only the "name" of the day for the week, no month, nothing numeric

    anyone know of such a script?


    thank you so much!

    your roomie hali~!:)
     
  2. tacopalypse

    tacopalypse Executive VIP Jr. VIP Premium Member

    Joined:
    Nov 30, 2009
    Messages:
    980
    Likes Received:
    2,485
    Home Page:
    • Thanks Thanks x 1
  3. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    HTML:
    <script type="text/javascript">
    
    var mydate=new Date()
    var day=mydate.getDay()
    var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
    document.write("<strong>"+dayarray[day]+"</strong>")
    
    </script>
    Hope that helps,
    Lynn.
     
    • Thanks Thanks x 1
  4. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    Basically that outputs just the day in <strong></strong> Tags - make sure you put it in between your statement or phrase - and it will work nicely.
     
    • Thanks Thanks x 1
  5. nambooooo

    nambooooo Regular Member

    Joined:
    May 21, 2009
    Messages:
    219
    Likes Received:
    71
    Location:
    GreenMTN
    Yeah, like he said ... More specific
    Code:
    Hope your <?php echo date("l"); ?> is good.
     
    • Thanks Thanks x 1
    Last edited: Sep 10, 2010
  6. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    oh thank you so much!!!!

    thank you thank you thank you!!!!

    about to head to bed but will test them in the am
    I really appreciate it !!! :30:

    hali ~! !!! :)~~
     
  7. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    No worries! ;)
     
  8. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    lynhs

    that worked fantastic !!
    thank you thank thank you!!!

    big smiles!!!!

    hali~!:)
     
  9. stuggling1

    stuggling1 Newbie

    Joined:
    Jun 20, 2010
    Messages:
    15
    Likes Received:
    1
    Good question and thanks for the script LyNHSLy
     
  10. stuggling1

    stuggling1 Newbie

    Joined:
    Jun 20, 2010
    Messages:
    15
    Likes Received:
    1
    sorry - thank you LyNHS
     
  11. deziner

    deziner Newbie

    Joined:
    Oct 22, 2010
    Messages:
    25
    Likes Received:
    15
    the php date function already has the option heh