SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    First PHP Script

    I have installed my first PHP script - today.php
    It appears correctly with exception to the DAY. The day position shows "1" instead of "Friday".
    This can be viewed at http://www.keypcservices.com/today.php
    Please help.

  2. #2
    SitePoint Addict
    Join Date
    Oct 2003
    Location
    United States
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in your date function, you're probably using "N" instead of l (lowercase 'L').

    So instead of

    Code php:
    echo "Today's Date (according to this Web server) is " . date("N, F [i]dS Y[/i]");

    It should read:

    Code php:
    echo "Today's Date (according to this Web server) is " . date("l, F [i]dS Y[/i]");

    Date Function in the PHP manual: http://us2.php.net/manual/en/function.date.php

    Next time show some code as well. This problem may have been easy to fix, but for more intricate problems we can't guess your code.


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
  •