$check) { $seconds = $check[1]; $count = floor($since / $seconds); //if we can't go any further, exit loop if($count < 1) { break; //if we can, update the name and the total } else { $name = $check[0]; $total = $count; } } //begin creating our return value by adding total $return = $total; //if it's greater than 1 if($total > 1) { //if this is millenia, change the pluralization accordingly if($name == 'millenium') { $return .= ' ' . 'millenia'; //if this is centuries, change the pluralization accordingly } elseif($name == 'century') { $return .= ' ' . 'centuries'; //otherwise just add an s } else { $return .= ' ' . $name . 's'; } //if it isn't, just return the singular name } else { $return .= ' ' . $name; } //append 'ago' to the return string $return .= ' ago'; //return time since return $return; } else { return $false; } } //END borrowed ?>