Albatross Posted July 26, 2007 Share Posted July 26, 2007 Heya once again! This time is's an easy one and I read it on this site just last week but shucks if I can't find it when I need it... I'm trying to get the suffix to the day of the month... <?php echo date("D"); ?> This give me the number of the day, but not the suffix, 'th'. Today reads 26 and I'm trying to get it to read 26th without using code like this: <?php echo date("D"); ?><sup>th</sup> Quote Link to comment Share on other sites More sharing options...
yarnold Posted July 26, 2007 Share Posted July 26, 2007 <?php echo date("dS"); ?> Or, if you wanted it with sup.. <?php echo date("d").'<sup>'.date("S").'</sup>'; ?> Quote Link to comment Share on other sites More sharing options...
effigy Posted July 26, 2007 Share Posted July 26, 2007 <?php echo date("dS"); ?> Quote Link to comment Share on other sites More sharing options...
Albatross Posted July 26, 2007 Author Share Posted July 26, 2007 Caught it when my date showed 2627 when I used 'ds' and then Thuth when I used DS. Deductive logic kicked in at this point! Thank you all! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.