# Help work out age in PHP

**URL:** https://forum.kirupa.com/t/help-work-out-age-in-php/116579
**Category:** Uncategorized
**Created:** [July 19, 2004, 6:10pm UTC](https://forum.kirupa.com/t/help-work-out-age-in-php/116579 "2004-07-19T18:10:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![The\_Vulcan](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/the_vulcan/32/145_2.png) [@The\_Vulcan](https://forum.kirupa.com/u/The_Vulcan)
#### Post date: [July 19, 2004, 6:10pm UTC](https://forum.kirupa.com/t/help-work-out-age-in-php/116579/1 "2004-07-19T18:10:39Z")

</div>

Ok this is simple but I don’t know jack about mysql or php.

In flash I have a “dob” list box.

This pulls the dob from mysql in the for of “1989”

```php
 $dob = mysql_result($fewComments, $i, 'dob');

```

This is where I am sending that information to flash, but I dont want to send 1989, I want to send 15.

```php
 
print "<br>&writeage=";
if($numallComments == 0) { print " No entries yet.."; } 
else { $i = 0;
$dob = mysql_result($fewComments, $i, 'dob');
print'<b>Age: </b>'. $dob .'';}

```

I am assuming it is CURRENTDATE() - 1989 but I don’t know how to format CURRENTDATE so I can minus 1989

Any help or hints much appreciated…
