I have code to select SQL Server :
<?php
include "koneksi.php";
$sql = odbc_exec($koneksi, "select * from trip");
while (odbc_fetch_row($sql)) {
$no = odbc_result($sql, "number");
$start = odbc_result($sql, "start");
$finish = odbc_result($sql,"finish");
}
?>
This loop contains the following data :
|No| Start | Finish |
|1 |2018-01-01|2018-01-05|
|2 |2018-01-10|2018-01-13|
I want to make array like this :
array(
"2018-01-01",
"2018-01-02",
"2018-01-03",
"2018-01-04",
"2018-01-05",
"2018-01-10",
"2018-01-11",
"2018-01-12",
"2018-01-13"
);
How can I create an array from this date range?
NB : looping can be more than 2 lines