Re: convert date to reversed date
| From: | Jim Lucas | Date: | Tue, 30 Jan 2007 15:48:29 +0000 |
| Subject: | Re: convert date to reversed date | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-248029@lists.php.net to get a copy of this message | ||
Arpad Ray wrote:
$filename = implode(array_reverse(explode('/', $value))); I think you ment$filename = implode('', array_reverse(explode('/', $value)));
Arpad Reinhart Viane wrote:-- Enjoy, Jim Lucas Different eyes see different things. Different hearts beat on different strings. But there are times for you and me when all such things agree. - RushIs this a good way to convert 01/02/2007 to 20070201 $value='01/02/2007'; list($day, $month, $year) = split('[/.-]', $value); $filename=$year.''.$month.''.$day; It does work but i would like to verify if there are no better, more logical ways to do this. Thanks in advance