How To Subtract Year To Current Date In Codeigniter?

Codeigniter

Nicesnippets

638

26-12-2020


Hi Guys,

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

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

Example:


public function index(){

//Remove 1 year current date

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

}

Output:

26-12-2019

It will help you...