calculate age from dob

how to Calculate age from dob using php

Welcome back to shortlearner.com , today in this post we will see how to find the age of the user on the basis of their date of birth.
so we are going to write a program in php

Advertisement
that will help us to calculate age.

calculate age from dob

in the below program we are declared a variable $birthDate with having a date in mm/dd/yyyy format. after that we are using predefined php function explode(), so with the help of that function we will explode the date to get month ,date and year as well. after that we will calculate the age of user on the basis of user’s date of birth and current date.

Also Read
How to Install PHP on CentOS.
How to Send Attachment on mail using PHP.

PHP Login Script With Remember me.
Unable to create a directory a wordpress error

How to integrate Razorpay Payment Gateway using PHP.
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript

Tags: No tags

Comments are closed.