note 13618 deleted from function.getdate by jimw

From: Date: Mon, 22 Oct 2001 23:42:18 +0000
Subject: note 13618 deleted from function.getdate by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19301@lists.php.net to get a copy of this message
switch is a bit cleaner method for adding date suffixes: <P>$my_date = getdate($timestamp); $my_day = $my_date['mday']; <P>switch ($my_date['mday']) { case '1': case '21': case '31': $my_day .= 'st'; Break; case '3': case '23': $my_day .= 'rd'; Break; case '2': case '22': $my_day .= 'nd'; Break; default: $my_day .= 'th';<BR> }

« previous php.notes (#19301) next »