Thanks for all the help guys. I'll give those a look.
-Elliott
Search found 7 matches
- Fri Jan 25, 2008 10:40 am
- Forum: PHP - Code
- Topic: using date() need to count backwards
- Replies: 7
- Views: 289
- Thu Jan 24, 2008 9:20 pm
- Forum: PHP - Code
- Topic: using date() need to count backwards
- Replies: 7
- Views: 289
Re: using date() need to count backwards
Thanks for the reply, I think that prints the days as (starting form the 10th say) 10,9,8,7,6... But I need it to be 10,09,08,07... This is what I did...correct me it there's a better way $day = "09"; while($day > 0) { if($day < 10 && (stripos($day,"0")!==0)) ...
- Thu Jan 24, 2008 8:59 pm
- Forum: PHP - Code
- Topic: using date() need to count backwards
- Replies: 7
- Views: 289
using date() need to count backwards
I have a directory structure like such: /Year/Month/Day/image.jpg Where not every day or even month necessarily exists, and day and month values have leading zeros like 01,02,03...etc. I need to count backwards from a given date and check for the first existing date. If I use date("d") to ...
- Thu Jan 24, 2008 6:42 pm
- Forum: PHP - Code
- Topic: Help understanding recursive version of glob <Solved>
- Replies: 6
- Views: 509
Re: Help understanding recursive version of glob
Wow. So a bit of thought, and I think I see why I don't need that array (Sorry, and thanks for saying so). I guess it would be a bit of a burden on the server to make it generate that array every time the page loads. (That is how PHP works right?) I think instead I'll just count up or down from toda...
- Thu Jan 24, 2008 4:30 pm
- Forum: PHP - Code
- Topic: Help understanding recursive version of glob <Solved>
- Replies: 6
- Views: 509
Re: Help understanding recursive version of glob
Okay, I'm writing a program for a webcomic I do with some friends. I thought, to keep everything in order, I'd create a directory structure like comics/year/month/day/comic.jpg That way, I can generate thumbnails with gd or something and keep them in the same dir. And, as a bonus, I can print out li...
- Thu Jan 24, 2008 3:35 pm
- Forum: PHP - Code
- Topic: Help understanding recursive version of glob <Solved>
- Replies: 6
- Views: 509
Re: Help understanding recursive version of glob
Thanks, that worked. Although, not the way originally I thought it would. I expected a recursive directory listing of something like: /dir01/subdir01/sub2dir01...etc to make a multidimensional array where: array[0] = dir01 array[0][0] = subdir01 array[0][0][0] = sub2dir01 and so on... Since that is ...
- Thu Jan 24, 2008 1:56 pm
- Forum: PHP - Code
- Topic: Help understanding recursive version of glob <Solved>
- Replies: 6
- Views: 509
Help understanding recursive version of glob <Solved>
I found this function on php.net in the comments for glob but I'm having trouble understanding it. My server has PHP5 by the way. function getRecursiveFolderList($curDir,$currentA=false) { $dirs = glob($curDir . '/*', GLOB_ONLYDIR); $cur = 0; ...