note 98921 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 15 Aug 2010 18:35:42 +0000 |
| Subject: | note 98921 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171698@lists.php.net to get a copy of this message | ||
Note Submitter: rush at bigup dot com dot pa
----
This is a simple function I did to print the names of the month in spanish.
the variable $dateMes is the month in mm format just as you take it from a Mysql date field.
it takes the int value of the mm month and then prints the position of an array with the names of
month.
<?php
function Mes($dateMes)
{
$mes=Array(
"",
"enero",
"febrero",
"marzo",
"abril",
"mayo",
"junio",
"julio",
"agosto",
"septiembre",
"octubre",
"noviembre",
"diciembre");
return $mes[intval($dateMes)];
}
?>