Easy Rotator – PHP text rotations

Have you been wanting a simple text rotation script where on every page load the given text is selected randomly? Do you want to keep the “spiderability” (SEO value) of the text – unlike javascript rotators?

Look no further as your question has been answered. Enter – Easy Rotator.

$aText = array(
1 => '<h1>random header 1</h1> <p>random text 1</p>',
2 => '<ul><li>random list 1</li></ul>',
3 => 'whatever you want to put here');

$iNumText = count($aText);

echo $aText[rand(1, $iNumText)];

In each array you can put nearly whatever you want. Create entire blocks of elements, rotate a single word, rotate an entire page of content, rotate headers, etc. See it in action.

It’s as simple as putting this script wherever you want something rotated, and then modify each array item with the (x)HTML or text or images you want rotated. Feel free to contact us with any questions.

Code: See it in action
Added benefit: It will keep the “spiderability” (SEO value) of the text – unlike javascript rotators

Leave a Reply

Your email address will not be published. Required fields are marked *