I now have a table like this. The numbers in it are ages, which are read from the database. The following is the php code
The effect I require now is to divide the colors according to the zodiac (for example: 01, 13, 25, 37, 49 is a chicken, just write chicken below the age, the background color is red. 02, 14, 26, 38 If you are a monkey, just write monkey below the age, the background color is blue, and so on...), the following is the rendering I made with PS
Is there any master who can help me? I just learned PHP and I still don’t understand the basics of PHP. I hope the master can give me some advice. Thank you very much.
Write 12 styles, such as hou ji or 1 2, etc. Set 12 zodiac signs, such as hou ji or 1 2, etc. Just set the style directly when looping
Set twelve colors, and let each color correspond to a number (and zodiac sign) from 1-12. The test data is randomly generated from 1 to 49, and there may be duplicates.
A method num($no); $no is to obtain data.
For the convenience of testing, all data are randomly generated numbers from 1 to 49.
You have to find the pattern. The difference between each number is 12. The chicken sign starts from 1 and adds 12, while the monkey sign starts from 2 and adds 12.