I need to get the number of years from 2 dates provided. Here\'s my code:
function daysDifference($endDate, $beginDate) { $date_parts1=explode(\"-\", $beg
On a PHP 5.2 box (yeah really, they still exist) so without DateTime::diff() support I ended up using this:
$dateString='10-05-1975'; $years = round((time()-strtotime($dateString))/(3600*24*365.25))