Hi everyone,
I have to execute below php in the template which to have a random images on the header. but when I used Ctrl + U to see the source code the php code is not execute and it doesnt say error, but it is display the same thing in my source code. I was wandering how can we execute such php code in the template? I tried to look for helps on internet, but it seemed lack of resources.
<?php
$num = Rand (0,6) ;
switch ($num) {
case 0:
$header = 'header_accountability.png';
break;
case 1:
$header = 'header_courage.png';
break;
case 2:
$header = 'header_democracy.png';
break;
case 3:
$header = 'header_integrity.png';
break;
case 4:
$header = 'header_justice.png';
break;
case 5:
$header = 'header_solidarity.png';
break;
case 6:
$header = 'header_transparency.png';
break;
}
?>
<div id="Header">Thanks
S