How to Calculate Age based on Birthday (DOB) in PHP

If you looking for showing the user age based on his/her date of birth (Birthday) which is store in database. This can be done by easy way available in PHP. The Code Snippet for Age Calculator in PHP as follows,

PHP Age Calculator

In PHP the following functions are used to calculate the user age,

  1. date()
  2. date_create()
  3. date_diff()

This is a simple way to find the date from any birth date by using PHP function.

Leave a Comment

Your email address will not be published. Required fields are marked *

twelve + 5 =