So i wanna do something like this in php. If i have a year in brackets [1995] I want it to convert it to the the difference of the current year to 1995.
Something like "It's been [1995] years since something happened."
so with it being 2009, it'd say
"It's been 14 years since something happened."
Obviously the subtracting part would be pretty easy, but I can't figure out how I'd write this so that i can put any number in brackets and the php would output the difference. I'm using this for a calendar, where dozens of dates stay the same each year, just want to note the difference.
I wanna use something like
preg_replace(array_keys($bbcode), array_values($bbcode), $events)
$bbcode array already has some items like this
"/\[url\=(.*?)\](.*?)\[\/url\]/is" => "<a href='$1' target='_blank'>$2</a>",