Q: how to print all date bettween 2 dates I'm sure if it possible so I consult with you.
I have 2 string that contain dates: d/m/Y
for instant:
$from_date= "17/10/2018";

$till_date = "20/10/2018";

is it possible to print the total number of day between those dates and also to print the dates?
For instant:
4 days
17/10/2018

18/10/2018

19/10/2018

20/10/2018


A: This should work:
$start = new DateTime('2018-10-17');
$end = new DateTime('2018-10-20');

while ($start <= $end) {
    echo $start->format('Y-m-d') . '<br>';
    $start->modify('+1 day');
}


A: Using the DateTime class and it's associated method createFromFormat to translate the supplied dates to a workable format and adding a DateInterval makes this fairly straigtforward
$int    = new DateInterval('P1D');
$start  = DateTime::createFromFormat('d/m/Y','17/10/2018')->sub( $int );
$end    = DateTime::createFromFormat('d/m/Y','20/10/2018');


while( $start < $end )echo $start->add( $int )->format('Y-m-d') . '<br />';

outputs:
2018-10-17
2018-10-18
2018-10-19
2018-10-20

To obtain the specified output format change the format string as supplied to the format method - ie: ->format('d-m-Y')

A: 
just for helping to implement .is not full description

you can use this code
echo date('Y-m-d', strtotime($from_date. ' + 1 days'));

for next day until arrive at the $till_date

A: Yes you can try something like this :
$arr = array("17-10-2018", "18-10-2018", "19-10-2018", "20-10-2018");
$countDateBetweenDates = 0;

foreach ($arr as $value) {

    if (strtotime($value) > strtotime("17-10-2018") && strtotime($value) < strtotime("20-10-2018")) {

        $countDateBetweenDates = $countDateBetweenDates + 1;
    }       

}

echo $countDateBetweenDates;

