I have a form with two input fields where the user puts in two dates in the format YYYY-MM-DD. They post the form and when they do this I want to create a array with dates stretching from one date to the other.
Example.
The user puts in 2002-02-04 and 2002-02-10 and posts it. How (the best way) do I create an array looking like this:
arrDates = array("2002-02-04", "2002-02-05", "2002-02-06", "2002-02-07", "2002-02-08", "2002-02-09", "2002-02-10");
Should I use range() or will I be forced to make a loop?
Would be grateful over an example :-)
Tnx in advance
/Andrin