Hi, I'm a VB dev and this is my 1st day developing with PHP.
I've retrieved a list of files from a directory and stripped off the ".: and the file extensions
and also the 1st 3 letters of the file name itself since they are always constant (ex. "bbn10052005.htm").
What I'm left with is a string "10052015" to which I've added two slashes in it so it looks like a date .
"10/05/2015". After loading it into an array and attempted to sort which didn't work.
I'm guessing I should convert into a date and then sort? Not sure about the correct way to convert or if i'm going in the right direction.
Ultimately I will stack the dates up in descending order. Right now I'm getting this
01/08/2015
01/22/2015
01/23/2014
02/04/2013
02/05/2015
02/06/2014
02/19/2015
02/21/2013
03/05/2015
03/07/2013
03/13/2014
Any Ideas , thoughts or samples would be greatly appreciated.
Thanks
I've retrieved a list of files from a directory and stripped off the ".: and the file extensions
and also the 1st 3 letters of the file name itself since they are always constant (ex. "bbn10052005.htm").
What I'm left with is a string "10052015" to which I've added two slashes in it so it looks like a date .
"10/05/2015". After loading it into an array and attempted to sort which didn't work.
I'm guessing I should convert into a date and then sort? Not sure about the correct way to convert or if i'm going in the right direction.
Ultimately I will stack the dates up in descending order. Right now I'm getting this
01/08/2015
01/22/2015
01/23/2014
02/04/2013
02/05/2015
02/06/2014
02/19/2015
02/21/2013
03/05/2015
03/07/2013
03/13/2014
Any Ideas , thoughts or samples would be greatly appreciated.
Thanks