Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/08/2015, 14:33
charlescuella
 
Fecha de Ingreso: febrero-2009
Mensajes: 489
Antigüedad: 15 años, 2 meses
Puntos: 8
Respuesta: Ciclo For sumar dias y excluir dias domingos

Parece que he dado con la solución a lo que faltaba

aca la pongo el codigo fin.
Código PHP:
Ver original
  1. $prestamo->cuotas = 30;
  2. echo "<b>Cuotas $prestamo->cuotas</b>"."</br></br>";
  3.  
  4. $j=0;
  5.                     for ( $i = 1 ; $i <= $prestamo->cuotas ; $i ++) {
  6.                         $cuota->num_cuota = $i;
  7.                         $registrado_fin = strtotime ( "+$i day" , strtotime (date ('Y-m-d'))) ;
  8.                         $registrado_fin = date ( 'Y-m-d' , $registrado_fin );
  9.  
  10.                         $registrado_fin2 = strtotime ( "+$i day" , strtotime (date ('Y-m-d'))) ;
  11.                         $registrado_fin2 = date ( 'D' , $registrado_fin2 );
  12.  
  13.                         if ($registrado_fin2 !='Sun') {
  14.                             $j++;
  15.                             echo "$j / $registrado_fin / $registrado_fin2"."</br>";                            
  16.                         }else{
  17.                             echo "-------------------------------- </br>";
  18.                             $prestamo->cuotas = $prestamo->cuotas + 1;
  19.  
  20.                         }
  21.  
  22.                        
  23.                     }

de nuevo muchas gracias por la colaboración prestada
__________________
sitios
www.avisoya.com
www.yavendi.com