|
|
|
 |

December 6th, 2003, 03:10 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: PHP Help Needed
Quote:
Edit: Ahh, I run win server...
|
Windows and Linux treat code rather differently at times. 
|

December 6th, 2003, 03:11 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Ruatha:
What I've done is to define filenames[array] at the same time as Filearray in the beginning.
And started the counter at 1 instead of zero.
As this work I can't be of any help in rooting out your problem, sorry.
|
That does not work, because each filename has 4 other variables that go along with it that must be kept lined up. 
|

December 6th, 2003, 03:11 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Imperator Fyron:
Sorting a normal array is not a problem. I could just call the asort() function if that were the case. The problem is in sorting a 2D array.
|
Yeah, that's what I meant with Multiarray, instead of simple array, my own vocabulary I guess....
How about making a simple 1D array also with only filenamess, and then sort that and let the multiarray (2D) follow in the sorting at the same time;
Define multiarray[1..10][1..10]
filenames_only[1..10]
Sort:
If filename[1]>Filename[2]
{
max=[1]
}
loop it and sort it
{
first filename is filename[max]
first multiarray is multiarray[max]
}
?
[ December 06, 2003, 01:15: Message edited by: Ruatha ]
|

December 6th, 2003, 03:14 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Ruatha:
quote: Originally posted by Imperator Fyron:
Sorting a normal array is not a problem. I could just call the asort() function if that were the case. The problem is in sorting a 2D array.
|
Yeah, that's what I meant with Multiarray, instead of simple array, my own vocabulary I guess.... That was posted before your edit. 
|

December 6th, 2003, 03:15 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: PHP Help Needed
Quote:
How about making a simple 1D array also with only filenamess, and then sort that and let the multiarray (2D) follow in the sorting at the same time;
|
That seems like overkill, and it seems like there should be some way to sort 2D arrays... but it is worth a shot. 
[ December 06, 2003, 01:17: Message edited by: Imperator Fyron ]
|

December 6th, 2003, 03:16 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Imperator Fyron:
quote: Originally posted by Ruatha:
quote: Originally posted by Imperator Fyron:
Sorting a normal array is not a problem. I could just call the asort() function if that were the case. The problem is in sorting a 2D array.
|
Yeah, that's what I meant with Multiarray, instead of simple array, my own vocabulary I guess.... That was posted before your edit. Sometimes a new post can be the proper choice instead of an edit I guess...
Edit:especially in a fast post thread as this, I won't edit much more..
[ December 06, 2003, 01:16: Message edited by: Ruatha ]
|

December 6th, 2003, 03:17 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Imperator Fyron:
quote: How about making a simple 1D array also with only filenamess, and then sort that and let the multiarray (2D) follow in the sorting at the same time;
|
That seems like overkill, and it seems like there should be some way to support 2D arrays... but it is worth a shot. I agree, there must be an easy way, easy if one knows it... 
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|