note 30635 added to ref.strings

From: Date: Mon, 24 Mar 2003 15:35:43 +0000
Subject: note 30635 added to ref.strings
Groups: php.notes 
Request: Send a blank email to php-notes+get-45739@lists.php.net to get a copy of this message
Here's a better function to get the numerical thingy (1st, 2nd, 3rd, etc): function nth ($n) { $rn = $n{strlen($n)}; switch ($rn) { case 1: $suffix = "st"; break; case 2: $suffix = "nd"; break; case 3: $suffix = "rd"; break; default: $suffix = "th"; break; } return $n . $suffix; } -- http://www.php.net/manual/en/ref.strings.php http://master.php.net/manage/user-notes.php?action=edit+30635 http://master.php.net/manage/user-notes.php?action=delete+30635 http://master.php.net/manage/user-notes.php?action=reject+30635

« previous php.notes (#45739) next »