I need help..
Is there a function in PHP or Postgresql that converts cardinal numbers (1,2,3, etc) to ordinal numbers in the form 1st, 2nd, 3rd and so on...?
thanks a lot in advance...
As far as i know there's no such function within PHP. However, you could try something like this:
<?php
if($nr == 1) { $nr = $nr."st"; } elseif($nr == 2) { $nr = $nr."nd"; } elseif($nr == 3) { $nr = $nr."rd"; } elseif($nr >= 4) { $nr = $nr."th"; }
?>
appel