I have table which has the table field name:
- Start Date
- Duration Count (e.g. 1, 2 or 3)
- Duration Name (e.g. Daily, Monthly, Yearly)
- End Date
How do I code in PHP to calculate the end date from a particular start date?
E.g. The start date is on 1st January 2013, and duration count is 1, duration name is yearly.
Which actually meant to be 1 year duration. How do I code in order to get the answer of
31st December 2013 in my end date column?
Example Formula: $StartDate + $DurationCount & $DurationName = $EndDate?