note 21286 deleted from function.substr by sander
| From: | sander@php.net | Date: | Sun, 12 May 2002 15:49:43 +0000 |
| Subject: | note 21286 deleted from function.substr by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-30534@lists.php.net to get a copy of this message | ||
joe@dirte.com, there is a cleaner way to do the following code.
$date = "1998-07-16";
$array = explode('-', $date);
$year = $array[0];
$month = $array[1];
$day = $array[2];
$newdate = "$array[2]-$array[1]-$array[0]";