Home  >  Article  >  Backend Development  >  Please help with php car rental algorithm, wait online.

Please help with php car rental algorithm, wait online.

WBOY
WBOYOriginal
2016-08-04 09:19:441012browse

Post the example website first: URL

If the number of people here changes, the price details below will also change. The cars with different seats in the list are combined according to the number of people, and choose the plan with the lowest price.
Related conditions, 1: Number of days, there are three types: 1, 2, and 3. The prices of cars with different number of seats corresponding to each are different. As shown in the picture:
Please help with php car rental algorithm, wait online.

Please help with php car rental algorithm, wait online.

Please help with php car rental algorithm, wait online.

days represents the corresponding number of days, price is the current price, and seats is the number of seats.
Now, when the number of days is 1, 2, and 3 respectively, vehicle matching is carried out according to the number of people entered, and the number of people ranges from 20 to 500 people.
The data in the picture here is what I took out from the database. It is a two-dimensional array. You can also refer to the order transmission json in the network of the example website. This array is a two-dimensional array. It is sorted and displayed in PHP. Here in the array The amount represents the number of vehicles of this type based on the current number of people, which is used as the basis for page display. minamount should be auxiliary data.
That’s the problem. If you don’t understand, I’ll add it. Wait online~~~~

Reply content:

Post the example website first: URL

If the number of people here changes, the price details below will also change. The cars with different seats in the list are combined according to the number of people, and choose the plan with the lowest price.
Related conditions, 1: Number of days, there are three types: 1, 2, and 3. The prices of cars with different number of seats corresponding to each are different. As shown in the picture:
Please help with php car rental algorithm, wait online.

Please help with php car rental algorithm, wait online.

Please help with php car rental algorithm, wait online.

days represents the corresponding number of days, price is the current price, and seats is the number of seats.
Now, when the number of days is 1, 2, and 3 respectively, vehicle matching is carried out according to the number of people entered, and the number of people ranges from 20 to 500 people.
The data in the picture here is what I took out from the database. It is a two-dimensional array. You can also refer to the order transmission json in the network of the example website. This array is a two-dimensional array. It is sorted and displayed in PHP. Here in the array The amount represents the number of vehicles of this type based on the current number of people, which is used as the basis for page display. minamount should be auxiliary data.
That’s the problem. If you don’t understand, I’ll add it. Wait online~~~~

Statement:
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