Forums

How to display "at" in post time (6 posts)

  1. jchaven
    Member
    Posted 4 years ago #

    I am trying to display the word "at" in the time of post in the following code:

    <?php the_time('l, F j, Y @ g:i a'); ?>

    The @ symbol works but I want the word. Is this possible?

    Thanks,
    Joey

  2. mdawaffe
    Member
    Posted 4 years ago #

    http://us4.php.net/manual/en/function.date.php

    Try:
    <?php the_time('l, F j, Y a\t g:i a'); ?>

    You may only need 1 backslash in front of the t.

  3. jchaven
    Member
    Posted 4 years ago #

    Great! at did the trick!

    Thanks,
    Joey

  4. jchaven
    Member
    Posted 4 years ago #

    I meant at.

  5. jchaven
    Member
    Posted 4 years ago #

    ok -- "slash a slash t"

  6. mdawaffe
    Member
    Posted 4 years ago #

    Damn - sorry. My slashes got stripped. Glad you figured it out.

    For others:

    \a\t
    or maybe \a\\t

    Whatever works :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.