Could you tell me your exact solution that you need ...
I used the code below
$interval = new DateInterval('P2Y4DT6H8M');
echo $ interval-> d;
he gives o / p as 4
if i use this
$interval = new DateInterval('P2Y'); echo $interval->d;
it gives o / p as 0
That way it will return the day specified in Dateinterval (), otherwise it will return zero ..
U please tell me the exact requirement, please .......... :)
Vinoth13
source share