function getRandomImages($numOfEntries) {
$rootPath = substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/")+1);
$randIndexes = array_rand($this->images, $numOfEntries);
$html = '';
for($i=0; $i<count($randIndexes); $i++) {
$imgPath = $this->images[$randIndexes[$i]];
$html .= '<img src="'.$rootPath.'thumbnails/'.basename($imgPath).'"/>'."\n";
}
return $html;
}