Below is the code for a FOR loop that renders out a list of times as so:

```
...etc...
8:45 am
8:50 am
8:55 am
9:00 am
9:05 am
9:10 am
...etc.

```

This is a script that runs a five minute interval, and there is currently no issue with this script because it is divisible by 60. However, I need to make it where I can make that time interval whatever amount I want, for instance 9 minutes. I tried changing
`for ($j >= 0; $j <= 55; $j+=5)` **to** `for ($j >= 0; $j <= 59; $j+=9)` desiring an output of:

```
...etc...
8:36 am
8:45 am 
8:54 am
9:03 am
9:12 am
9:21 am
...etc

```

I WANT IT TO CARRY OVER TO THE NEXT HOUR AND CONTINUE LIKE ABOVE...and notice how the first hour began with :00....and how the next hour began with :03, because 54 plus 9 is 03 speaking in hour terms, that is what I'm looking to do..
However it is outputting only up to the last value before it is less than or equal to 59 and than it quits: i.e

```
...etc...
8:36 am
8:45 am
8:54 am
---AND STOPS HERE---

```

Above is how it is echoing.

Below is my code:

```
$day = date("n/j/y");

            $startTime = date(strtotime($day." $coursetee_open_time_slashed"));
            ///needs to be in "16:00" format
            $endTime = date(strtotime($day." $coursetee_close_time_slashed"));
            ///needs to be in "16:00" format

            $timeDiff = round(($endTime - $startTime)/60/60);

            $startHour = date("G", $startTime);
            $endHour = $startHour + $timeDiff; 

            for ($i=$startHour; $i <= $endHour; $i++)
                {
                    for ($j >= 0; $j <= 55; $j+=5)
                    {
                        $time_pre = $i.":".str_pad($j, 2, '0', STR_PAD_LEFT);
                        $time = ''.$time_pre .' '.$day.'';

                        /////////////////////////////

                        $time_formated_for_cosmetic = date("g:i a", strtotime("$time"));
                        $time_formated_for_mysql = date("Y-m-d H:i:s", strtotime("$time"));
                            if (isset($tee_times_from_mysql[$time])) {
                                $time = '';
                            } else {
                                $time = '<option value="' . $time_formated_for_mysql . '">'.$time_formated_for_cosmetic .'</option>';
                            }
                            echo $time;
                    }

            }

```