Can anyone help me out with the code below, I am running in to a parse error at the ; at the end of the $days array statement.
I've stared at this for about an hour and can't fathom it.
Any help would be greatly appreciated.
function convertDate($date){ // Convert String to Actual Date
$days = array(1 => "-1 day", 7 => "-7 days", 14 => "-14 days", 30 =>"-1 month");
if(isset($days[$date])) {
return date('Y-m-d', strtotime($days[$date]);
} else { // passed an invalid period.
return false;
}
}