julisana wrote in php 😟exhausted Union Station Kansas City

Listens: 96.5 The Buzz

A fluffy little question

Unlike many of my past posts, this post is purely about how I want something to look without trying to implement it in a clunky, conditional manner.

Plus, I'm sure I've seen this before (though it's possible it wasn't in PHP).

What function, if any, will put the appropriate...suffix, I guess...on a numeric input?

For Example: Putting the st on 1st or the nd on 2nd.

Small Disclaimer: I know I could look this up myself. I'm perfectly capable of searching php.net or google.com, but the fact is...I'm not entirely sure what this is called. "Suffix" was the closest I could even remotely come. So along with possibly giving me the answer to my question...letting me know the name of what I'm asking about would be helpful as well. :D