Calculate zodiac signs
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 08:50:23
Original
1600 people have browsed it
-
- /**
- * Calculation. Zodiac
- *
- * @param int $year Year
- * @return str
- */
- function get_animal($year){
- $animals = array(
- 'Rat', 'Ox', 'Tiger', 'Rabbit', 'Dragon ', 'Snake',
- 'Horse', 'Sheep', 'Monkey', 'Chicken', 'Dog', 'Pig'
- );
- $key = ($year - 1900) % 12;
- return $animals [$key];
- }
-
- echo get_animal(1990); // Horse
- echo get_animal(2010); // Tiger
Copy code
|
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2025-02-26 03:58:14
-
2025-02-26 03:38:10
-
2025-02-26 03:17:10
-
2025-02-26 02:49:09
-
2025-02-26 01:08:13
-
2025-02-26 00:46:10
-
2025-02-25 23:42:08
-
2025-02-25 22:50:13
-
2025-02-25 21:54:11
-
2025-02-25 20:45:11
Latest Issues
-
2025-03-21 13:39:34
-
2025-03-21 13:38:34
-
2025-03-21 13:37:19
-
2025-03-21 13:35:24
-
2025-03-21 13:34:32