I’m building my own advertisement platform, and I have a little problem. How can I show my ads an equal number of times?
So for example:
Name | Views
Ads 1 | 100
Ads 2 | 98
Ads 3 | 99
So my system need to show the ads with the least views, in this case “Ads 2 or Ads 3”.
So all my ads follow each others views. So when my 3 ads have 3.000 views total, there should be 1.000 views on every view.
I’m coding in PHP, and I don’t have an example, because I need inspiration how to fix my problem.
Select your least viewed add like this:
This way, all the ads with less views will slowly catch up.
— Edit, using your next requirement
If you need something else, you’d better explain you whole requirement first. Because if it is not clear for you, it won’t be clear in your question, and the answers won’t do what you want.