SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict jamesbond's Avatar
    Join Date
    Feb 2001
    Location
    The Netherlands
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am trying to get the current week of the year.

    I tried this:

    $currentweek = (strftime("%W"));

    But this gives me a parse error

    I am able to print the current week like this :

    print(strftime("%W"));

    But I want to compare the current week to another variable like this:

    if ($week > $currentweek) { etc.. }


    Regards,

    JamesBond

  2. #2
    SitePoint Addict jamesbond's Avatar
    Join Date
    Feb 2001
    Location
    The Netherlands
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stupid of me

    this works:

    $currentweek=strftime("%W") ;


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •