Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Php date suffix

  1. #1
    Regular Coder Andy92's Avatar
    Join Date
    Nov 2005
    Location
    Horsham, West Sussex, UK
    Posts
    363
    Thanks
    7
    Thanked 1 Time in 1 Post

    Php date suffix

    Hi there,

    In my php code, if i put "j S" in a variable as the date it comes up with...

    1st (but it displays it as the st higher than the 1)

    But how do i make the suffix like st, th, rd, etc not go up so it would look like this...

    1st

    So the suffix would be all on 1 line and the st wouldn't move up?

    Is there any way to do this?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    That is quite interesting. What does your html source look like? What you're saying is the date function added <super> tags to the output? I've never heard of that before. Can you post the html source code?

    Are you sure it's not just putting a space between the number and the "st"? Try "jS", not "j S".

  • #3
    Regular Coder Andy92's Avatar
    Join Date
    Nov 2005
    Location
    Horsham, West Sussex, UK
    Posts
    363
    Thanks
    7
    Thanked 1 Time in 1 Post
    Yes i have put the s right next to the j and its worked!

    Thanks!


  •  

    Posting Permissions

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