From an API call i get the following date I suppose as a string format : [end_date] => 2018-09-20
Now I have my own created date in my PHP script: $date = '2017-09-20'
;
Now I want to check if end_date from the API request is larger than my own created date string.
I tried the following :
if($req['end_date'] > strtotime('2019-12-01') || !$req['end_date'])
It didnt work tho. Help is appreciated!
Also tried :
if(strtotime($req['end_date']) > strtotime('2019-12-01') || !$req['end_date'])
The if statement should also pass when there is not end_date from the api response. Thats what the or is for.