I have this code:
<?php echo $price; ?>
which gives me this result:
1,500.99
Is there any way I can make the decimals superscript or subscript?
Thanks.
EDIT: This code works like a charm (thanks to David Thomas):
$parts = explode('.', $price);
echo "$parts[0].<sup>$parts[1]</sup>";
but if I have a price like this: 1,500.99€ it superscripts the € sign as well. Can this be stoped? To not superscript it if it's not a number, or to superscript only 2 characters after the dot?