I am looking for a simple PHP script that will loop through an unlimited list of snippets (text/numbers/HTML code/PHP code/etc.) and insert one onto a web page in an exact order.
The script itself should be in an external file. The fuction that will call the script and display the snippets would be part of a WordPress theme template.
The original intent is for the script to serve different AdSense publisher IDs on a multi-author blog in a way that allows to control their individual share of ad impressions and is not random.
Therefore, snippets should rotate regardless of who is requesting the page. Like that... "user 1 visits the page and gets snippet 1, then user 2 visits the page and gets snippet 2, then user 1 reloads and gets snippet3". Once the last snippet on the list is displayed, the first one will follow, in an unfinished loop.
No admin interface is necessary. The snippets should ideally be stored in a plain text file using delimiters to separate individual snippets (no mysql database, pls).
Some of the snippets will themselves be executable PHP code, more specifically, WordPress tags (example: <?php the_author_description(); ?>).