note 86203 added to function.is-numeric
[email protected] Tue, 7 Oct 2008 16:50:33 -0700
Newsgroups
php.notes
Message-ID
<[email protected] >
"$e = (int) substr( $n , -2 );"
What the heck am I thinking.
function number_suffix2($n)
{
$s = array( 1->'st' , 2=>'nd' , 3=>'rd' );
$e = $n % 100;
$x = $n % 10;
return $n.( ( $x > 0 && $x < 4 && ( $e < 11 || $e > 13 ) ) ? $s[$x] : 'th' );
}
----
Server IP: 208.69.120.35
Probable Submitter: 69.138.17.84
----
Manual Page -- http://www.php.net/manual/en/function.is-numeric.php
Edit -- https://master.php.net/note/edit/86203
Del: integrated -- https://master.php.net/note/delete/86203/integrated
Del: useless -- https://master.php.net/note/delete/86203/useless
Del: bad code -- https://master.php.net/note/delete/86203/bad+code
Del: spam -- https://master.php.net/note/delete/86203/spam
Del: non-english -- https://master.php.net/note/delete/86203/non-english
Del: in docs -- https://master.php.net/note/delete/86203/in+docs
Del: other reasons-- https://master.php.net/note/delete/86203
Reject -- https://master.php.net/note/reject/86203
Search -- https://master.php.net/manage/user-notes.php