note 97967 added to function.is-numeric
| From: | purdue at nc dot rr dot com | Date: | Tue, 18 May 2010 23:57:41 +0000 |
| Subject: | note 97967 added to function.is-numeric | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169382@lists.php.net to get a copy of this message | ||
I see a lot of examples below to get the ordinal string for a given number ("1st",
"2nd", "3rd", "4th", etc). If you only need small ordinals (up to
"31st" at most), this one-line trick works:
<?php
function ordinal ($i) {
return date("jS", strtotime("Jan $i"));
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 71.70.224.192
----
Manual Page -- http://www.php.net/manual/en/function.is-numeric.php
Edit -- https://master.php.net/note/edit/97967
Del: integrated -- https://master.php.net/note/delete/97967/integrated
Del: useless -- https://master.php.net/note/delete/97967/useless
Del: bad code -- https://master.php.net/note/delete/97967/bad+code
Del: spam -- https://master.php.net/note/delete/97967/spam
Del: non-english -- https://master.php.net/note/delete/97967/non-english
Del: in docs -- https://master.php.net/note/delete/97967/in+docs
Del: other reasons-- https://master.php.net/note/delete/97967
Reject -- https://master.php.net/note/reject/97967
Search -- https://master.php.net/manage/user-notes.php