note 68504 added to ref.strings
| From: | admin at rotarymulundeast dot org | Date: | Sun, 30 Jul 2006 10:16:42 +0000 |
| Subject: | note 68504 added to ref.strings | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115340@lists.php.net to get a copy of this message | ||
Here's an easier way to find nth...
function nth($numbex){
if ($numbex%10 == 1 && $numbex%100 != 11) $sth='st';
elseif ($numbex%10 == 2 && $numbex%100 != 12) $sth='nd';
elseif ($numbex%10 == 3 && $numbex%100 != 13) $sth='rd';
else $sth = 'th';
return $sth;
}
there is is no need to check if the user has entered a non-integer as we may be using this function
for expressing variables as well eg. ith value of x , nth root of z ,etc...
----
Server IP: 81.92.200.26
Probable Submitter: 221.128.144.206
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.strings.php
Edit -- http://master.php.net/note/edit/68504
Del: integrated -- http://master.php.net/note/delete/68504/integrated
Del: useless -- http://master.php.net/note/delete/68504/useless
Del: bad code -- http://master.php.net/note/delete/68504/bad+code
Del: spam -- http://master.php.net/note/delete/68504/spam
Del: non-english -- http://master.php.net/note/delete/68504/non-english
Del: in docs -- http://master.php.net/note/delete/68504/in+docs
Del: other reasons-- http://master.php.net/note/delete/68504
Reject -- http://master.php.net/note/reject/68504
Search -- http://master.php.net/manage/user-notes.php