Revision: 6562
at May 30, 2008 22:03 by distinctdev

Updated Code
```function numberToPlace(\$number) {

if(!is_numeric(\$number)) return false;
\$number = intval(\$number);
\$lastNumber = substr(\$number, -1);
\$lastTwo = substr(\$number, -2);

\$append = (\$lastNumber == '1' && \$lastTwo != 11) ? 'st' : ((\$lastNumber == '2' && \$lastTwo != 12) ? 'nd' : ((\$lastNumber == '3' && \$lastTwo != 13) ? 'rd' : 'th'));

return \$number . \$append;
}```

Revision: 6561
at May 30, 2008 15:24 by distinctdev

Initial Code
```function numberToPlace(\$number) {

if(!is_numeric(\$number)) return false;
\$number = intval(\$number);
\$lastNumber = substr(\$number, -1);

\$append = (\$lastNumber == '1' && \$number != 11) ? 'st' : ((\$lastNumber == '2' && \$number != 12) ? 'nd' : ((\$lastNumber == '3' && \$number != 13) ? 'rd' : 'th'));

return \$number . \$append;
}```

Initial URL

Initial Description
`Convert an number to a position / ranking. 1 becomes 1st, 2 becomes 2nd, etc...`

Initial Title
`Convert a number to a position / ranking`

Initial Tags
`number, convert`

Initial Language
`PHP`
{"ft_lang_label":"__label__en","ft_lang_prob":0.50532913,"math_prob":0.99941134,"size":1131,"snap":"2022-40-2023-06","text_gpt3_token_len":353,"char_repetition_ratio":0.21206744,"word_repetition_ratio":0.3448276,"special_character_ratio":0.37931034,"punctuation_ratio":0.25128207,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99590313,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-03T06:51:05Z\",\"WARC-Record-ID\":\"<urn:uuid:d25bfb01-753a-43ae-8716-a9c54204bbbd>\",\"Content-Length\":\"14641\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9e132d4c-54c1-4710-a8c7-0bba69ece03b>\",\"WARC-Concurrent-To\":\"<urn:uuid:613d5ca0-6ad2-428b-8cb9-5af0fa913fd5>\",\"WARC-IP-Address\":\"104.25.39.44\",\"WARC-Target-URI\":\"https://ipv6.snipplr.com/snippet/6506/revisions\",\"WARC-Payload-Digest\":\"sha1:7AWYIW7QBEL7CMEYZEKLLL2XTXJGTZGH\",\"WARC-Block-Digest\":\"sha1:BEOIT4TBYLIDAV4QERKL7QLXL2T6THED\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500044.16_warc_CC-MAIN-20230203055519-20230203085519-00863.warc.gz\"}"}