Cannot add php code Cannot add php code
 

News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

Cannot add php code

Started by broomsy, October 13, 2005, 12:55:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

broomsy

I am trying to add this PHP code
<?php $array = array('1'=>'templateimages/picture1.jpg','2'=>'templateimages/picture2.jpg','3'=>'templateimages/picture3.jpg','4'=>'templateimages/picture4.jpg','5'=>'templateimages/picture5.jpg','6'=>'templateimages/picture21.jpg','7'=>'templateimages/picture25.jpg','8'=>'templateimages/picture29.jpg'); $arraycount count($array);$rnum rand(1$arraycount); print "<img src=\"$array[$rnum]\" alt=\"Music Box - Past clubbers and special guests\" />";?>
but nothing is happening. Is there a way to add php to the template?

Nibbler