Php missing dates 10 days [closed]

-1

I have a question and I would like to know if it is possible in this code instead of showing dates already expired show dates that are missing 10 days to expire.

 if(!empty($row[10]) AND ($row[11] < time() || $row[12] < time() || 
 $row[13] < time() || $row[14] < time() || 
 $row[15] < time() || $row[16] < time() || 
 $row[17] < time())){

Instead of appearing the team that is the current date is the date that is missing 10 days.

PS: In the example that shows me the dates that are already expired. I now only want to show dates whose date is 10 days to expire.

    
asked by anonymous 06.08.2014 / 11:36

1 answer

1

Let's imagine that the date is 2014-07-29, to go get 10 days behind this date just do the following:

   <?php
       //Precisa de definir a função abaixo para evitar warnings
       date_default_timezone_set('America/Los_Angeles');
       //Sua data original
       $Date = "2014-07-29";
       //Modifica a data (10 dias atrás) 
       $data_actual = date('Y-m-d', strtotime($Date. ' - 10 days'));
       //Mostra resultado
       echo $data_actual;
    ?>
    
06.08.2014 / 13:10