RE: Date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> 
> How do I break $start_date into 3 variables --- 4 digit year, 2 digit
> month and 2 digit day?
> 
> $start_year = ;
> $start_month = ;
> $start_day = ;
> 
> 

<?PHP

$start_date='2007-06-20';

$parts=explode('-',$start_date);

$start_year = $parts[0];
$start_month = $parts[1];
$start_day = $parts[2];

?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux