Display Dates between from date to date

Hi…

Good day!

I have table that has a field from_date and to_date.

Now I just want to know if how can I display as table format the dates between from_date to_date.

Like this

from_date: 2011-12-16
to_date: 2011-12-31

I want to display it:

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 // table format.

Thank you

Take the from date, add a day, print it, and keep doing this until you reach the to date.