note 63389 added to ref.math

From: Date: Tue, 21 Mar 2006 22:48:27 +0000
Subject: note 63389 added to ref.math
Groups: php.notes 
Request: Send a blank email to php-notes+get-106183@lists.php.net to get a copy of this message
Just a simple function to find the ordinal ending to any number if you're printing for example: "The nth result is..." function ordinal($num) { $digit = substr($num,-1,1); $ord = array( 0 => 'th', 1 => 'st', 2 => 'nd', 3 => 'rd', 4 => 'th', 5 => 'th', 6 => 'th', 7 => 'th', 8 => 'th', 9 => 'th' ); $string = $num.$ord[$digit]; return $string; } ---- Server IP: 64.71.164.2 Probable Submitter: 158.83.143.148 ---- 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.math.php Edit -- http://master.php.net/note/edit/63389 Del: integrated -- http://master.php.net/note/delete/63389/integrated Del: useless -- http://master.php.net/note/delete/63389/useless Del: bad code -- http://master.php.net/note/delete/63389/bad+code Del: spam -- http://master.php.net/note/delete/63389/spam Del: non-english -- http://master.php.net/note/delete/63389/non-english Del: in docs -- http://master.php.net/note/delete/63389/in+docs Del: other reasons-- http://master.php.net/note/delete/63389 Reject -- http://master.php.net/note/reject/63389 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#106183) next »