$date_array=explode("-",$newdate); $day = $date_array[2]; $month = $date_array[1]; $year = $date_array[0];
Or, $timestamp - strtotime($newdate); $today = getdate($timestamp); $month = $today['month']; $mday = $today['mday']; $year = $today['year']; "Alexander Tsonev" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > I would ask you a question about date type > if I have a variable from date type ($newdate) such as 2003-02-17 > how can I separate $newdate into 3 different variables? I want to create > such variables: > $day=17 > $month=2 > $year=2003 > I searched a lot, but I didn't find how to do this. > I'll be very happy if someone helps! > > Thanks in advance, Alexander Tsonev > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php