Is there any other way to get this?
$oneTime = preg_replace('/[^0-9]/', '', $one);
$twoTime = preg_replace('/[^0-9]/', '', $two);
$threeTime = preg_replace('/[^0-9]/', '', $three);
if($oneTime == '') {
$oneTime = '1 month';
}
if($oneTime == '7') {
$oneTime = '7 days';
}
if($oneTime == '24') {
$oneTime = '24 hours';
}
if($twoTime == '') {
$twoTime = '1 month';
}
if($twoTime == '7') {
$twoTime = '7 days';
}
if($twoTime == '24') {
$twoTime = '24 hours';
}
if($threeTime == '') {
$threeTime = '1 month';
}
if($threeTime == '7') {
$threeTime = '7 days';
}
if($threeTime == '24') {
$threeTime = '24 hours';
}