note 56440 deleted from function.date by derick

From: Date: Sun, 15 Jan 2006 12:42:35 +0000
Subject: note 56440 deleted from function.date by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-101827@lists.php.net to get a copy of this message
Note Submitter: Greg ---- I had a situation where I wanted to generate the name of all months from their numerical representation in a for/loop. To do this: $foo being numerical representation of month (1-12) for ($foo=1; $foo<=12; $foo++) { echo date("F", mktime(0, 0, 0, $foo)) ; } Will return name of month dependant on $foo value. If $foo == 1, January is returned etc. Very useful when creating select/option HTML boxes.

« previous php.notes (#101827) next »