RE: [PHP] Date
| From: | Jim Moseby | Date: | Wed, 20 Jun 2007 13:40:03 +0000 |
| Subject: | RE: [PHP] Date | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-257487@lists.php.net to get a copy of this message | ||
>
>
> 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];
?>