Ask a Question related to PHP Development, Design and Development.
-
Lowell Allen #1
Re: [PHP] File ordering
> I am doing a 'readdir' on a subdirectory. I did my file naming counting on
Just sort the $imgFiles array.> it ordering based on numbering... But when I do the readdir it isn't doing
> it. My naming convention 002_2003_66.jpg would indicate the 66th picture for
> the month of Feb in 2003. This gave me automatic sorting. So I thought. But
> it doesn't seem to be doing it. The server is a linux server
> ((IStop/Doncaster consulting) and I don't see why the ordering is screwing
> up. I checked the create dates and that isn't the ordering choosen (I have
> pictures from July showing up between pictures from March).
>
> Thoughts, suggestions?
>
> Katherine
>
> This is the clip of code(srcdir being passed in):
>
> $imgdir = "$srcdir/images";
> $txtdir = "$srcdir/txt";
> $imgdh = opendir($imgdir);
> $txtdh = opendir($txtdir);
>
> while($file = readdir($imgdh)) {
> if(substr($file,-3)=="jpg") {
> $imgFiles[] = $file;
> $textFileName = substr($file,0,-3)."txt";
> $textFiles[] = $textFileName;
> }
> }
--
Lowell Allen
Lowell Allen Guest
-
Grouping and ordering
The manual says "MySQL extends the use of GROUP BY so that you can use non-aggregated columns or calculations in the SELECT list that do not appear... -
Help Ordering Records
I have a database with two fields: ID and SVCS. SVCS contains a comma delimited list. So records on the dabase might look like this: ID - SVCS 1... -
table ordering
Hi, Hope someone may be able to help me. I have created a dropdown style menu in Fireworks, and a movie in Flash, and am putting it all together... -
Ordering by date ???
I have created a DB in Access 2000. The Date Field (clientdate) is currently a MEMO field. The date is being entered as: 10 June 2004 21... -
Ordering of recordsets
Create some links (or a drop-down <select> list) that the user can click on to select the way they want the collection ordered. Dynamically build... -
Curt Zirzow #2
Re: [PHP] File ordering
* Thus wrote Katherine Barry (katherine@manaiakoru.com):
hmm.. this wont sort properly:> I am doing a 'readdir' on a subdirectory. I did my file naming counting on
> it ordering based on numbering... But when I do the readdir it isn't doing
> it. My naming convention 002_2003_66.jpg would indicate the 66th picture for
> the month of Feb in 2003. This gave me automatic sorting. So I thought. But
002_2003_66.jpg
002_2004_66.jpg
003_2003_66.jpg
Use YEAR_MONTH_NUMBER.jpg
also,
002_2003_123.jpg
002_2003_66.jpg
Isn't entirely what you want.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
Curt Zirzow Guest



Reply With Quote

