Results 1 to 5 of 5

Thread: Insert day date php into template

  1. #1
    Antony is offline Active Member
    Join Date
    Sep 2006
    Posts
    167

    Default Insert day date php into template

    <%php%>
    echo date("l \\t\h\e jS");
    <%php%>

    I am trying to insert the date in php into a template, somebody knows.
    This code doesn't work.

    Antony

  2. #2
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    The first issue is that you don't have a closing tag

    Second, to echo the date simply use the following echo date("Y/m/d");

    Google is your friend, you could have found this answer easily if you had searched.

  3. #3
    Antony is offline Active Member
    Join Date
    Sep 2006
    Posts
    167

    Default

    Hello...
    I think as always i will have a better answer by google....
    Have a good day...

    Antony
    Hotel Discount Web Search
    www.hotel-discount.com

  4. #4
    Mitchell's Avatar
    Mitchell is offline Active Member
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Quote Originally Posted by Antony View Post
    <%php%>
    echo date("l \\t\h\e jS");
    <%php%>

    I am trying to insert the date in php into a template, somebody knows.
    This code doesn't work.

    Antony
    Try this;

    <%$smarty.now|date_format:"%A %e %B, %Y"%>

  5. #5
    Antony is offline Active Member
    Join Date
    Sep 2006
    Posts
    167

    Default

    Thank's...
    Work find....
    You're better than google & bruce....
    Hotel Discount Web Search
    www.hotel-discount.com

Similar Threads

  1. How to insert tag to a feed rss
    By Antony in forum Blocks and Modification
    Replies: 3
    Last Post: 09-02-2007, 05:02 PM
  2. Replies: 1
    Last Post: 02-05-2007, 06:46 AM
  3. How to insert a new page?
    By enrico in forum Tutorials, Hints & Tips
    Replies: 7
    Last Post: 10-18-2006, 10:11 PM
  4. Change Date of Links (date added)
    By brickholius in forum v5.x
    Replies: 5
    Last Post: 11-04-2004, 07:30 PM

Posting Permissions

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