This might sound weird and might be very simple but my mind just isn't thinking properly right now.
I'm displaying the date with following format using PHP Date function
date('l, F jS Y, time());
Displays: Wednesday, April 10th 2013
How do I make th somehow a superscript without trying to extract the th from the returned string and applying CSS to it?
you can split it into multiple parts:
$formatted = date('l, F j') . '<sup>' . date('S') . '</sup> ' . date('Y');
It's not particularly efficient, calling date so many times, but it's somewhat more reliable than a string operation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With