Build a Text (or Anything) Rotator in 4 Lines of Code
One random dull quote.
<?php $items = Array( 'One random dull quote.', 'A second random dull quote.', 'A third random dull quote.', ); // Obtain number of items in the array: $num_items = count($items) - 1 ; // Pick a number between 0 and total: $pick_number = rand(0, $num_items) ; // Print HTML container with the selected item: echo "<p>" . $items[$pick_number] . "</p>\n" ; ?>