$str ='Dec-30 08:15';
how do you add 10 days to $str and convert the date into Y-m-d H:i:s format? i remember u need to use strtotime.. but i cant get it working for some reason.
thanks lots~
I would look into using [man]mktime()[/man]
that string must be tweaked a bit before it can fed to [man]strtotime[/man]
$str = 'Dec-30 08:15'; $str = str_replace(' ', ' ' . date('Y') . ' ' , $str); $str = str_replace('-', ' ', $str); echo date('Y-m-d H:i:s', strtotime($str) + 864000);
use mktime(0,0,0,date("m"),date('d')+3,date("Y")
this will add 3 days
eg > date today 12,01,2004) added 3 days (12,04,2004)\