Re: convert date to reversed date

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

 



Arpad Ray wrote:
$filename = implode(array_reverse(explode('/', $value)));
I think you ment

$filename = implode('', array_reverse(explode('/', $value)));


Arpad

Reinhart Viane wrote:
Is 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





--
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.

- Rush

--
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