Forum Moderators: coopster
can someone tell me how to break down a date variable?
input: $date="2008-04-07";
output: $year="2008"; $month="04"; $day="07";
list [php.net]($yyyy, $mm, $dd) = explode [php.net]('-', '2008-04-07');
$date = '2008-04-08'; $year = substr($date,0,4); $month = substr($date,5,2); $day = substr($date,8,2);
Personally, I would use Coop`s method, but just thought I would offer an alternative.
dc