I’m playing about with a bit of code to select dates from and to
[php]
<?php foreach (range($dayFrom, $dayTo) as $day) { foreach (range($monthFrom, $monthTo) as $month) { foreach (range($yearFrom, $yearTo) as $year) { ?> [/php]in the tag I have
[php ]
<?php echo $day, $month, $year; ?><?php
}
}
}
?>
[/php ]
I also have a form with 6 list menu’s named as above, I won’t add the code because its to long.
When I run the script with dates 02 - 01 - 2006 to 15 - 01 - 2006 I get the following
212006
312006
412006
512006
612006
712006
812006
912006
1012006
1112006
1212006
1312006
1412006
1512006
What I want to get is
02-01-2006
03-01-2006
04-01-2006
05-01-2006
06-01-2006
07-01-2006
08-01-2006
09-01-2006
10-01-2006
11-01-2006
12-01-2006
13-01-2006
14-01-2006
15-01-2006
Anyone got an idea how I can do this