Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/12/2014, 00:40
macquero
 
Fecha de Ingreso: diciembre-2009
Mensajes: 42
Antigüedad: 14 años, 4 meses
Puntos: 0
Respuesta: PHP NOW() a días con respecto a la fecha actual

Cita:
Iniciado por jamie_88 Ver Mensaje
Hola, si lo tienes que hacer con php podrías usar date_diff, si lo puedes hacer por base de datos, podrías usar DATEDIFF.


Saludos
Thanks for your reply.

I have been trying to play with the date_diff function but I'm not able to make it work inside the following loop:

Código PHP:
    while ($server_data mysql_fetch_array($result)) {
      
$info = array();
      
$info['date_add'] =  $server_data['date_add'];
      
$diff=date_diff($info['date_add'],time()); } 
What I'm doing wrong?