I have a table of users in sql and they each have birth dates. I want to convert their date of birth to their age (years only), e.g. date: 15.03.1999
age: 14 and 15.03.2014
will change to age: 15
Here I want to show the date of the user:
if(isset($_GET['id']))
{
$id = intval($_GET['id']);
$dnn = mysql_fetch_array($dn);
$dn = mysql_query('select username, email, skype, avatar, ' .
'date, signup_date, gender from users where id="'.$id.'"');
$dnn = mysql_fetch_array($dn);
echo "{$dnn['date']}";
}