On 31st of every month you will get a wrong month value while using date() or strtotime() functions.
In that case you need to pass the date of the first day of the current month as a second parameter to the strtotime() function.
$base_month = strtotime(date('Y-m',time()) . '-01 00:00:01'); echo date('Y-m',strtotime('-1 months', $base_month)); echo date('Y-m',strtotime('-2 months', $base_month)); echo date('Y-m',strtotime('-3 months', $base_month));
For any types of queries, you can contact us on info[at]namasteui.com.
Facing Google penalties can be a daunting challenge for businesses relying on organic search traffic.…
Technology, undeniably, has made our lives easier. But the advent of artificial intelligence has been…
Guest post services have become an essential tool for businesses and individuals looking to increase…
Programming continues to evolve at a rapid pace, with new trends and technologies emerging every…
Let’s be honest; a startup business hardly has sufficient amount to promote their services and…
Introduction In today's digital age, having a strong online presence is crucial for businesses in…