0) { srand((double)microtime()*1000000); $y = rand(0,(count($images) - 1)); $msg = "\""\n"; } else { $msg = "No random images located in \"" . $DIRNAME . "\"\n"; } } else { $msg = "\"" . $DIRNAME . "\" does not appear to be a valid directory!\n"; } return $msg; } #DisplayRandomImage ######## ?> Random Image Should see a random image below:


The PHP tag used above is:
<?=DisplayRandomImage()?>