note 110662 deleted from function.chr by aharvey
| From: | aharvey@php.net | Date: | Tue, 20 Nov 2012 13:15:49 +0000 |
| Subject: | note 110662 deleted from function.chr by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192043@lists.php.net to get a copy of this message | ||
Note Submitter: rajivrisi at gmail dot com
----
instead of doing very long switch case to get month number form a month use like below.
<?php
$monthName = 'January';
$month = date('m', strtotime($monthName));
echo $month;
//Output: 1
?>