Re: [PHP] Sorting times (SOLVED)

2009-05-15 Thread German Geek
Just a draft i thought should not go unnoticed on the list :-) just cleaning up. OK, How about a super efficient soln where each string is only converted once and a fast sorting algorithm is used: http://www.ihostnz.com Fred Allen - "California is a fine place to live - if you happen to be an or

Re: [PHP] Sorting times (SOLVED)

2009-02-15 Thread Shawn McKenzie
tedd wrote: > At 9:31 PM -0600 2/14/09, Shawn McKenzie wrote: >> >> Yeah, hif I had known that you wanted a function where you loop through >> your array twice, that would have done it. Bravo. > > Shawn: > > I don't see another way. You go through the array converting string to > time (seconds),

Re: [PHP] Sorting times (SOLVED)

2009-02-15 Thread tedd
At 9:31 PM -0600 2/14/09, Shawn McKenzie wrote: Yeah, hif I had known that you wanted a function where you loop through your array twice, that would have done it. Bravo. Shawn: I don't see another way. You go through the array converting string to time (seconds), sort, and then convert back

Re: [PHP] Sorting times (SOLVED)

2009-02-14 Thread Shawn McKenzie
tedd wrote: > At 4:15 PM -0500 2/14/09, John Corry wrote: >> 1. convert the string representation of times to timestamps using >> strtotime() >> 2. sort the timestamps >> 3. display the timestamps as strings using date('format', timestamp) >> >> Would that work? >> >> John Corry >> email: jco...@gm

Re: [PHP] Sorting times (SOLVED)

2009-02-14 Thread tedd
At 4:15 PM -0500 2/14/09, John Corry wrote: 1. convert the string representation of times to timestamps using strtotime() 2. sort the timestamps 3. display the timestamps as strings using date('format', timestamp) Would that work? John Corry email: jco...@gmail.com John: Bingo -- that worke

Re: [PHP] Sorting times

2009-02-14 Thread Shawn McKenzie
John Corry wrote: > 1. convert the string representation of times to timestamps using > strtotime() > 2. sort the timestamps > 3. display the timestamps as strings using date('format', timestamp) > > Would that work? > > John Corry > email: jco...@gmail.com > > > > > On Feb 14, 2009, at 4:07

Re: [PHP] Sorting times

2009-02-14 Thread John Corry
1. convert the string representation of times to timestamps using strtotime() 2. sort the timestamps 3. display the timestamps as strings using date('format', timestamp) Would that work? John Corry email: jco...@gmail.com On Feb 14, 2009, at 4:07 PM, tedd wrote: Hi gang: Anyone have/kno