PHP. I have three arrays, filled with 50 items each: $articles, $quotes, $links. Each item in each array has a line of content and a date.
The objective is to create one array, sorted by date (newest to oldest), that weights based on the importance of the array type. For example, it should always show more articles than quotes, and more quotes than links. For example:
Article, article, article, quote, article, link, article, article, quote, article, article, quote, article, link.
Is there any simple way to do this? Thanks!
You could take advantage of the mod operator.