Published in: PHP
This randomly displays 1 of the 5 arrays (amount of arrays to choose from can be reduced or increased)
/* Inspired by Simple randomizer. Roger Johansson, http://www.456bereastreet.com/ */ 'href' => 'link.html', 'title' => 'text', 'src' => 'image-1.jpg', 'alt' => 'text' ), 'href' => 'link.html', 'title' => 'text', 'src' => 'image-2.jpg', 'alt' => 'text' ), 'href' => 'link.html', 'title' => 'text', 'src' => 'image-3.jpg', 'alt' => 'text' ), 'href' => 'link.html', 'title' => 'text', 'src' => 'image-4.jpg', 'alt' => 'text' ), 'href' => 'link.html', 'title' => 'text', 'src' => 'image-5.jpg', 'alt' => 'text' ) ); echo "\t" . '<a href="' . $item['href'] . '" title="' . $item['title'] . '"><img src="' . $item['src'] . '" alt="' . $item['alt'] . '"></a>' . "\n";
You need to login to post a comment.
