Rando pics

Rando pics

by pelleth thomas -
Number of replies: 2

Recently I have seen some discussions around random images, I am interested. I got the following code from an expert who doesn't have a background of the Moodle issues. I told him I have five images titled.. image1.... image5 which are all uploaded into the "File" section. I copied the follwing code under the window "toggle HTML source", under "Add Label" but I don't get the expected output. Can some one help?  Thanks.. Tom

<img src="<?php $min=1; $max=5; $result = rand($min,$max); $filead = "image_".$result.".jpg"; echo $filead; ?>">

Average of ratings: -