Easiest way is to use timestamps to calculate the difference in seconds between 2 dates, then divide by the number of seconds in a year. Check out the Date Time Functions section of the manual for all functions relating is date calculations.
<?php
// number of seconds in 365 days
$yearSec = 31536000;
$dob = mktime(0,0,0,$month,$day,$year);
$current = mktime(0,0,0,date("m"),date("d"),date("Y"));
if (round((($current - $dob)/$yearSec),0) >= 13)
echo "13 or older\n";
else
echo "12 or younger";
?>
-geoff