[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    RE: [PHP]SOLVED convert date to reversed date
From:       "Reinhart Viane" <rv () domos ! be>
Date:       2007-01-31 9:33:59
Message-ID: 20070131093406.BDEEED418F () asia ! telenet-ops ! be
[Download RAW message or body]

Thx All

-----Oorspronkelijk bericht-----
Van: Jim Lucas [mailto:lists@cmsws.com] 
Verzonden: dinsdag 30 januari 2007 16:52
Aan: Jim Lucas
CC: Arpad Ray; rv@domos.be; php-general@lists.php.net
Onderwerp: Re: [PHP] convert date to reversed date

Jim Lucas wrote:
> Arpad Ray wrote:
>> $filename = implode(array_reverse(explode('/', $value)));

I should have checked before I wrote.  It does work, but through me off, 
didn't realize that the first arg was optional.  Sorry


> 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

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic