Page 1 of 1

pre-determined array?

Posted: Mon Sep 17, 2007 7:48 am
by aceconcepts
Hi,

I guess this is an opinionated post...

I would like to display a list of time slots (0800 to 2000) a lot like a diary may contain.

What would be the best way of going about this?

My initial thoughts were:
1. Store the values in a table and then loop values in order to display them
2. Create a pre-determined array and simply loop and display values

For each time slot displayed I would like to display a corresponding "body" i.e. like an appointment slot.

Any comments?

Posted: Mon Sep 17, 2007 8:01 am
by Zoxive
Use Timestamps in the Database.

Then its just as easy as using some of Mysql's Date and Time Functions.

Posted: Mon Sep 17, 2007 8:16 am
by aceconcepts
Thats kinda what I was thinking. Thanks for the post Zoxive :D