SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: date

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    date

    I know how to add the date to a page. how would i go about making it so it displays the day and a comment about it like:

    Today is Friday, Its the end of the week!

    Understand me?

  2. #2
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just have a set of responses, so that if $day == 'Friday' the comment would be: It's the end of the week!

    PHP Code:
    switch ($day) {
    case 
    'monday':
    $comment 'Stupid first day of the week';
    break;
    case 
    'friday':
    $comment "It's the end of the week!";
    break;

    Oh no! the coots are eating my nodes!


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
  •