Jump to content

[SOLVED] Header logo help


Recommended Posts

Hello,

I am atempting to create my header to display a random .jpg each time the page is refreshed but cannot seem to get it to work.

I have created header.php


<?php

$ban1 = "./img/logo01.jpg";
$ban2 = "./img/logo02.jpg";
$ban3 = "./img/logo03.jpg";

$randomNum = rand (1,3);
$image = ${'ban'.$randomNum};

Print ".$image.";
?>


and I have this located in the same directory as header.tpl which I have edited in the <!-- Header section -->



is there something I am doing incorrect, or is there a way to achieve what I am trying to do ?

Regards
Johnny
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...