This is how I did it but their has to be an easier way.
Not all of what is enclosed is PHP alot is html but it works. For displaying 2 random pictures from a directory.
<?
//This is the array of pictures to cycle through pictures on the header
$picture = array ("BasketWeave.jpg","ClassicAccenttoSolidPrivacyFence.jpg",
"ClassicAccenttoSolidPrivacyFence1.jpg", "closepic.jpg",
"CombinationPrivacyandOrnamental.jpg", "PrivacyWithLatticeRackedSteppedToFollowContour.jpg",
"PrivacywithSunburstDesign.jpg", "ScallopedPicket.jpg",
"solidprivacy.jpg","TanShadowBoxwithLattice.jpg", "Arbor.jpg",
"ClassicCornerAccent.jpg", "ClassicNewEnglandStyle.jpg",
"ClassicOrnamental.jpg", "ClassicRoundedCorner.jpg",
"ClassicScallopedPicket.jpg", "ClassicTraditional.jpg",
"CustomClassicOrnamental.jpg");
shuffle($picture);
//This is the header with the contact info for the company
?><body bgcolor="#AFD0F3" text="#000000">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#0000FF">
<tr>
<td width="14%">
<div align="center">
<?
$dirname="/Pictures/";
$alt=$picture[0];
$imagelocation=$dirname.$picture[0];
//This puts in one Random picture
$result="<img src=".$imagelocation;
echo $result
?>
</div></td>
<td width="72%">
<div align="center">
<p><strong><font size="+3" face="Comic Sans MS">JNS Fencing</font><font face="Comic Sans MS"><br>
Phone (303) 693-3344<br>
Fax (303) 693-3344</font></strong><font face="Comic Sans MS"><strong><br>
<a href="mailto:jsawchuk@jnsfencing.com">jsawchuk@jnsfencing.com</a><br>
<a href="javascript:bookmark ()">bookmark Us</a></strong></font></p>
</div></td>
<td width="14%">
<div align="center">
<?
//This puts in onother Random picture
$dirname="/Pictures/";
$alt1=$picture[1];
$imagelocation=$dirname.$picture[1];
//This puts in one Random picture
$result="<img src=".$imagelocation;
echo $result
?>
</div>
</td>
</td>
</tr>
</table>