Home › Forums › Support › (Random) Rotate Header / Logo (per page view) › Reply To: (Random) Rotate Header / Logo (per page view)
November 23, 2015 at 11:15 am
#155004
Genie Bohn
Just as a follow up….
The site is under re-construction, but you can see the random changes in the header.
Followed your instructions exactly. It will be easy to add more or change the images.
<?php
$headers = array(
'http://richardarmitageworld.com/images/logo1.jpg',
'http://richardarmitageworld.com/images/logo2.jpg',
'http://richardarmitageworld.com/images/logo3.jpg',
'http://richardarmitageworld.com/images/logo4.jpg',
);
$random = $headers[ rand( 0, count( $headers ) -1 ) ];
echo '<img src="' . $random . '" alt="" />';
?>
(Click “EXECUTE PHP” underneath.