Initially when i was using php_msssql extension the following line was working
$test2_date = date('d-M-y', strtotime( "".$res["test_date"]." +".$noofdays." days" ));
$res
is array.
Then i changed to php_sqlsrv_53_ts_vc9
extension due to which the above line was not working because "date" doesn't work in this extension so i used "date_format" which works in sqlsrv. My code line was like shown below
$test2_date = date_format(strtotime( "".$res["test_date"]." +".$noofdays." days" ), 'd-M-y');
but the strtotime is not working and hence i get the below error:-
Catchable fatal error: Object of class DateTime could not be converted to string.
what should i use to add days to the date?