note 109023 modified in function.date by danbrown
| From: | danbrown@php.net | Date: | Wed, 13 Jun 2012 15:23:07 +0000 |
| Subject: | note 109023 modified in function.date by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188565@lists.php.net to get a copy of this message | ||
Here's my solution for looking up the month number by name (used when parsing an
'ls'): <?php
for($m=1;$m<=12;$m++){
$month=date("M",mktime(0,0,0,$m,1,2000));
$mon["$month"]=$m; } ?>
--was--
Here's my solution for looking up the month number by name (used when parsing an
'ls'):
for($m=1;$m<=12;$m++){
$month=date("M",mktime(0,0,0,$m,1,2000));
$mon["$month"]=$m;
}
http://php.net/manual/en/function.date.php