Script para calcular la edad


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $birth_date = strtotime("1985-06-12");
  2.  
  3. printf("Tengo %d años de edad.", round(abs(time() - $birth_date)/60/60/24/365));

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.