PHP first day and last day of current month / día inicial y final del mes actual

To get the first day and last day of current month in PHP:
Para obtener el primero y último día del mes actual en PHP:

      $dfechaini=date("Y-m-d", mktime(0, 0, 0, date("m"), 1));
      $dfechafin=date("Y-m-t", mktime(0, 0, 0, date("m"), 1));

The trick is the first parameter in date "Y-m-d" first day "Y-m-t" last day plus mktime
El truco es el primer parámetro en date "Y-m-d" primer día "Y-m-t" último día más mktime


Comentarios

Entradas populares de este blog

2da Reeleccion del presidente Alvaro Uribe?

Lo sentimos la aplicación Contactos se detuvo.

Outlook Letras inmensas al dar Responder o Reenviar