How To Subtract Months To Current Date In Codeigniter?

Codeigniter

Nicesnippets

25-12-2020


Hi Guys,

In this example,I will learn you subtract months to current date in codeigniter.you can easy and simply subtract months to current date in codeigniter.

we will show subtract months in current date codeigniter.this tutorial will give you example of subtract months to current date using codeigniter.

Example:


public function index()

{

//Remove 1 month current date

$date = date('d-m-Y', strtotime('-1 months'));

}

Output:

25-11-2020

It will help you...