Wednesday, May 13, 2015

Ordinal Number

Here is a PHP function to get the ordinal number. Pass it a number, and it will return a textual number suffixed with either of "st" (like 1st), "nd" (like 2nd), "rd" (like 3rd), "th" (like 4th) etc.

No comments:

Post a Comment