Looping with dates.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Looping with dates.

Post by Todlerone »

Hello everyone. I'm creating another aspect to my baseball league web page. This time I'm trying to add a database creation form. By this I mean; a page with a form to create a database with input to get a start date and a end date, the days of the week available and diamonds used on those days of the week. What I would like to do is loop in my code from the start date to the end date and populate a database table with all the possible dates (with associated diamonds). How does one go about looping between two dates and pick apart the date for a particular day of the week.

Thank-you... 8O
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

strtotime() with data from date() (initially) can do this, but why? Why not create the record on-demand?
Post Reply