Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-04 Thread Jim Lucas
Jochem Maas wrote: Diogo Neves schreef: On Wed, Sep 3, 2008 at 12:35 AM, Vernon <[EMAIL PROTECTED]> wrote: I've gotten the one array down and I've figured out how to sort that array, however, I need to sort the array by the modified date of the file. Here's what I got so far: //HERE IS MY C

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-04 Thread Jochem Maas
Diogo Neves schreef: On Wed, Sep 3, 2008 at 12:35 AM, Vernon <[EMAIL PROTECTED]> wrote: I've gotten the one array down and I've figured out how to sort that array, however, I need to sort the array by the modified date of the file. Here's what I got so far: "; } } } ?> Any ideas on how to fi

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
That worked great. Thanks. "Micah Gersten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] http://us3.php.net/basename -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Micah Gersten
http://us3.php.net/basename Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Vernon wrote: > SOLVED! > > I made the following change as well to fix the file name: > > BEFORE: > echo date("m-d-Y", $entry['filemtime']) . " {$file}\n"; > AFTER: > echo dat

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
SOLVED! I made the following change as well to fix the file name: BEFORE: echo date("m-d-Y", $entry['filemtime']) . " {$file}\n"; AFTER: echo date("m-d-Y", $entry['filemtime']) . $entry['filename'] . " />\n"; One last question. The $entry['filename'] is the file name and path: /

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
All is weel except for 2 things: 1. $filemtime = filemtime( $dir . $file ); needed to be changed to > $filemtime = filemtime( $file ); 2. The filename is the same filename over and over again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Jim Lucas
Vernon wrote: I'm really starting to feel incompitant here. Sorry to ask, but could you show me what you mean? $file, 'filemtime' => $filemtime); # This is the list of filemtimes to sort by later $filemtimes[] = $filemtime; } # Sort array based on $filemtimes # http://php.net

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
I'm really starting to feel incompitant here. Sorry to ask, but could you show me what you mean? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Jim Lucas
Vernon wrote: Ok, I've gotten the following so far, which is giving me the results, except it is still sorting by file name and not the file's date. $file, 'filemtime' => $filemtime); # This is the list of filemtimes to sort by later $filemtimes[] = $filemtime; # Sort array based on $filem

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
Ok, I've gotten the following so far, which is giving me the results, except it is still sorting by file name and not the file's date. $file, 'filemtime' => $filemtime); # This is the list of filemtimes to sort by later $filemtimes[] = $filemtime; # Sort array based on $filemtimes # http:/

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
This may be a stupid question, but I am sick and under the guy and am wondering if you could you show me how to simply echo each file name using the exmaple below? Thanks "Jim Lucas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Jim Lucas wrote: ok, here would be my version of

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Jim Lucas
Jim Lucas wrote: Vernon wrote: I've gotten the one array down and I've figured out how to sort that array, however, I need to sort the array by the modified date of the file. Here's what I got so far: "; } } } ?> Any ideas on how to fix this? Thanks We need to see what is in the array, n

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Diogo Neves
On Wed, Sep 3, 2008 at 12:35 AM, Vernon <[EMAIL PROTECTED]> wrote: > I've gotten the one array down and I've figured out how to sort that array, > however, I need to sort the array by the modified date of the file. Here's > what I got so far: > > // Open current directory > if($handle = opendir($

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-02 Thread Jim Lucas
Vernon wrote: I've gotten the one array down and I've figured out how to sort that array, however, I need to sort the array by the modified date of the file. Here's what I got so far: "; } } } ?> Any ideas on how to fix this? Thanks We need to see what is in the array, not just how you th

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-02 Thread Chris
// if $files[] exists, sort it and print all elements in it. if(is_array($files)){ //HERE IS MY CURRENT SORT WHICH I KNOW I NEED TO CHANGE BUT AM UNSURE HOW sort($files); foreach($files as $file){ $completeFileName = $dir . $file; //I WANT TO SORT BY THIS echo date("m-d-Y", filemtime($completeFi

[PHP] PHP: Mulitiple Arrary Sort

2008-09-02 Thread Vernon
I've gotten the one array down and I've figured out how to sort that array, however, I need to sort the array by the modified date of the file. Here's what I got so far: "; } } } ?> Any ideas on how to fix this? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi