quick php help!
- Started
- Last post
- 7 Responses
- dddc
http://www.marc-vitale.com/daily…
i'm trying to get a daily photoblog type thing up and running. a friend coded the php for me and now he's gone.... so i'm here to ask one question.......... theres a few pics on there -- when you go there it always starts from OCT 18 for some reason.... and then it doesnt go back or forward in order.. kind of goes random.... i simply need it to start from TODAY'S date and when you click 'previous' go backwards..... u know?
http://dalphp.shoggoth.net/paste…
- thats the code im working with
- chl0
I don't think I see anything in that code that uses real dates, unless the images files themselves have some kind of date in the file names. The only sorting looks like the arsort() call on the array of images files.
- ********0
are you naming the pics correctly?
cause how i see it, how he exploded the date it read:
(l, M d, Y) whic is >
Tuesday, Oct 19, 2004now busted it out like:
(Ymd) which busted out the image tiyles that are posted > 20041019
- ********0
but chl is correct, it was calling out for today's date, not a specific
- dddc0
the titles are up as:
20041019.jpg
20041018.jpg
etc.
etc...ikben what do you mean
- dddc0
bump
- enobrev0
well, paul was stating that the $show variable is being set as 1. Since it's 1, it's going to start at the 1st image every time.
What you have to do in that loop that gathers the images into an array is have it look for the current date. If it finds the file is named after the current date, set $show to the array index of that image.
That's the english of it, now you just need someone to code it for you.
Meanwhile, I'm going to go have a drink..
Good Luck!
- dddc0
have a good one
bump