I have a script which i want to use to generate some data from a certain date. The problem i am having is setting the leading zero for minutes,hours and seconds.
For instance
<?php
for($i=0;$i<25;$i++){
//echo $i.'<br/>';
$start = "2012-10-01 $i:00:00";
echo $start.'<br/>';
}
?>
I want all hours from 0 to 9 to have a leading zero. Is there a functions that can help me have the leading zero in hours,minutes or seconds?.