function getRandomImages numOfEntries randIndexes array_rand this- ima

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
function getRandomImages($numOfEntries) {
$randIndexes = array_rand($this->images, $numOfEntries);
$html = '';
for($i=0; $i<count($randIndexes); $i++) {
$imgPath = $this->images[$randIndexes[$i]];
$html .= '<img src="'.$imgPath.'"/>'."\n";
}
return $html;
}