rpflorence
02-03-2008, 02:38 AM
So I'm new to PHP (and programming). I've created a flat file family blog that is automatically organized by directories each time I submit a new entry, in other words, each entry creates a new directory based on the date/time.
I'd like to place a link at the bottom to the next entry, and the previous entry.
So the directories might look like this:
2008_01_28_12_24/
2008_01_31_05_14/
2008_02_01_09_54/
2008_02_03_21_03/
Inside each is an index.php. I'd like to have a link that creates itself to the next, and previous directories on each page.
Could I read all the directory names into an array, sort them, and then put the current directory into a variable, and then somehow compare the current directory to the array and then place links to the one above and the one below the current?
Thanks! :D
I'd like to place a link at the bottom to the next entry, and the previous entry.
So the directories might look like this:
2008_01_28_12_24/
2008_01_31_05_14/
2008_02_01_09_54/
2008_02_03_21_03/
Inside each is an index.php. I'd like to have a link that creates itself to the next, and previous directories on each page.
Could I read all the directory names into an array, sort them, and then put the current directory into a variable, and then somehow compare the current directory to the array and then place links to the one above and the one below the current?
Thanks! :D