How can i get the current month and previous three months using PHP

date, php

Solution

for full textual representation of month you need to pass "F":

echo date("y:F:d");

for previous month you can use

`echo date("y:F:d",strtotime("-1 Months"))`;

Problem

Will any one tell me how to get the current month and previous three months using PHP For example: ``` echo date("y:M:d"); ``` output will be: 09:Oct:20 But i need: August September October as the Output. Thanks in advance... Fero

Original source

Related problems