php - I m not getting proper balanced days from below code:
516
$b='2014-06-01 14:57:15';
echo "Future Date:".$b;
$a=date('Y-m-d H:i:s');
echo "Current Date:".$a;
$c=$b-$a;
echo "Balance:".$c;
/*Its displaying one but want 6 months in answer*/
$d=date('Y-m-d H:i:s')+$d;
echo "New Future Date:".$d;
/*Wants to add with current date so that i get new date*/
Answer
Solution:
Try this