Calculate an Expiry Date in PHP

Hi folks, have the following in a script


if(eregi('3', $member_level)) {
$months = 3;
}elseif(eregi('6', $member_level)) {
$months = 6;
}elseif(eregi('12', $member_level)) {
$months = 12;
}
$date_joined = $row['date_joined'];
$expiry_date = date('Y-m-d', strtotime('+3 months'));

Basically I query the membership level to find out if they have signed up for a 3 month, 6 months or 12 month period. Then I need to add this to the their date_joined to find out the date their membership expires.

Anyone out there help me solve this