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
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"))
;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With