
12/05/2015, 16:21
|
 | | | Fecha de Ingreso: julio-2012 Ubicación: DF
Mensajes: 42
Antigüedad: 12 años, 8 meses Puntos: 10 | |
Respuesta: Sumar tiempos en foreach() $tiempo = new DateTime();
$tiempo->format('H:i A');
foreach($datos_tiempo AS $dato_tiempo)
{
echo $tiempo->add(new DateInterval('PT'.$dato_tiempo.'M'))->format('H:i A');
}
Ojo: Estoy pensando que vas agregar Minutos, por eso dice: 'PT'.$dato_tiempo.'M'
Si queires agregar horas pues le pones H en lugar de M |