I’m new to PHP and could use a little help figuring this out. I have a drupal website where I have a field that is called ‘field_date’. Inside that field there are two variables (date1 & date2) which are the start and end dates. I am trying to create a statement that says:
If the current date is between date1 and date2 then display ‘x’. If it is out of that date range then display ‘y’.
I can also get the current date by using the drupal date variable:
format_date(time(), 'custom', 'F d Y');
Thanks for anyone able to assist. I really do appreciate it!
UPDATE: For anyone that has this same question I got some help here.
convert your variables into one form and put them into if-statement