<?PHP
$quotes = array(
"This is my quote",
"To be or not to be",
"<b>You can</b> <u>use html</u>");
$count = count($quotes);
srand(time());
$random = (rand()%$count);
echo $quotes[$random];
?>
The first part creates an array named $quotes.
After that comes $count = count($quotes);. It counts how many entries there are in the $quotes-array and stores it in a variable named $count. We are using this var in the next step.
the srand(time());
$random = (rand()%$count); part creates a random number and stores it in a variable named $random. You can see that I am using the $count-variable. In this example it is 3. That is because of the 3 entries in the array that $count = count($quotes); counted.
The next part prints out a random entry from the array we created at the top. $random here equals a random number between 0-2. 0, 1, 2. If you didn't want it random you could write something like echo $quotes['2'];. That would print the last line of the array. Yes the third line. The counting starts at 0. 0,1,2,3,4,5.
If you want to print a random picture just put
<img src='address_to_image.jpg' alt='my picture'> in the array.