i have a problem to get month difference between two dates in months.
$d1 = date_create('January 1, 2013');
$date = date("F j, Y");
$d2 = date_create($date);
$dif = date_diff($d1, $d2);
//echo $dif->format('%y years');
echo $dif->format('%m months');
It shows months but not the whole difference in months. I just want the diff in months between dates.